summaryrefslogtreecommitdiffstats
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-07-30 17:32:30 +0000
committerNick Clifton <nickc@redhat.com>2002-07-30 17:32:30 +0000
commit7e392df659f7ea9da6974d689b050ae5fa62b3c6 (patch)
tree645fc64dad3284807cd4fb680343acdd1b098452 /bfd
parent83e1617e0623da0e1d2a8a148087928f5fb83c4e (diff)
downloadppe42-binutils-7e392df659f7ea9da6974d689b050ae5fa62b3c6.tar.gz
ppe42-binutils-7e392df659f7ea9da6974d689b050ae5fa62b3c6.zip
Add arm-*-nto port.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog16
-rw-r--r--bfd/Makefile.am6
-rw-r--r--bfd/Makefile.in6
-rw-r--r--bfd/config.bfd4
-rwxr-xr-xbfd/configure30
-rw-r--r--bfd/configure.in2
-rw-r--r--bfd/elf32-arm.h20
-rw-r--r--bfd/elfarm-nabi.c2
-rw-r--r--bfd/elfarmqnx-nabi.c33
-rw-r--r--bfd/targets.c2
10 files changed, 100 insertions, 21 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d2a919884a..3b43751382 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,19 @@
-2002-07-30 Nick Clifton <nickc@redhat.com>
+2002-07-30 Graeme Peterson <gp@qnx.com>
+ * elfarmqnx-nabi.c: New file: Support for QNX.
+ * config.bfd: Add support for arm-*-nto target.
+ * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
+ * configure: Regenerate.
+ * Makefile.am: Add entries for elfarmqnx-nabi.c.
+ * Makefile.in: Regenerate.
+ * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
+ Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
+ * elfarm-nabi.c: Do not include elf32-arm.h if
+ ELFARM_NABI_C_INCLUDED is defined.
+ * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
+
+2002-07-30 Nick Clifton <nickc@redhat.com>
+
* po/sv.po: Updated Swedish translation.
2002-07-30 Jakub Jelinek <jakub@redhat.com>
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 47b9f73b2f..4ea4c93689 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -200,6 +200,7 @@ BFD32_BACKENDS = \
elf32-arc.lo \
elfarm-oabi.lo \
elfarm-nabi.lo \
+ elfarmqnx-nabi.lo \
elf32-avr.lo \
elf32-cris.lo \
elf32-d10v.lo \
@@ -358,6 +359,7 @@ BFD32_BACKENDS_CFILES = \
elf32-arc.c \
elfarm-oabi.c \
elfarm-nabi.c \
+ elfarmqnx-nabi.c \
elf32-avr.c \
elf32-cris.c \
elf32-d10v.c \
@@ -1096,6 +1098,10 @@ elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-arm.h elf32-target.h
+elfarmqnx-nabi.lo: elfarmqnx-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-arm.h elf32-target.h
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index eb7ca684cb..6061e929f3 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -328,6 +328,7 @@ BFD32_BACKENDS = \
elf32-arc.lo \
elfarm-oabi.lo \
elfarm-nabi.lo \
+ elfarmqnx-nabi.lo \
elf32-avr.lo \
elf32-cris.lo \
elf32-d10v.lo \
@@ -487,6 +488,7 @@ BFD32_BACKENDS_CFILES = \
elf32-arc.c \
elfarm-oabi.c \
elfarm-nabi.c \
+ elfarmqnx-nabi.c \
elf32-avr.c \
elf32-cris.c \
elf32-d10v.c \
@@ -1626,6 +1628,10 @@ elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-arm.h elf32-target.h
+elfarmqnx-nabi.lo: elfarmqnx-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-arm.h elf32-target.h
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
diff --git a/bfd/config.bfd b/bfd/config.bfd
index d5a7b6a04f..ae949c4428 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -128,6 +128,10 @@ case "${targ}" in
targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
targ_underscore=yes
;;
+ arm-*-nto* | nto*arm*)
+ targ_defvec=bfd_elf32_littlearmqnx_vec
+ targ_selvecs=bfd_elf32_bigarmqnx_vec
+ ;;
arm-*-riscix*)
targ_defvec=riscix_vec
;;
diff --git a/bfd/configure b/bfd/configure
index 5d07921365..8ca0355a90 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -6063,6 +6063,7 @@ do
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
@@ -6086,6 +6087,7 @@ do
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
@@ -6322,10 +6324,10 @@ case ${host64}-${target64}-${want64} in
if test -n "$GCC" ; then
bad_64bit_gcc=no;
echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6326: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6328: checking for gcc version with buggy 64-bit support" >&5
# Add more tests for gcc versions with non-working 64-bit support here.
cat > conftest.$ac_ext <<EOF
-#line 6329 "configure"
+#line 6331 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
@@ -6370,17 +6372,17 @@ for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6374: checking for $ac_hdr" >&5
+echo "configure:6376: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6379 "configure"
+#line 6381 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6409,12 +6411,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6413: checking for $ac_func" >&5
+echo "configure:6415: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6418 "configure"
+#line 6420 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6437,7 +6439,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6462,7 +6464,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6466: checking for working mmap" >&5
+echo "configure:6468: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6470,7 +6472,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6474 "configure"
+#line 6476 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6623,7 +6625,7 @@ main()
}
EOF
-if { (eval echo configure:6627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -6648,12 +6650,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6652: checking for $ac_func" >&5
+echo "configure:6654: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6657 "configure"
+#line 6659 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6676,7 +6678,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
diff --git a/bfd/configure.in b/bfd/configure.in
index e2bc1dfd35..55c10b7880 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -564,6 +564,7 @@ do
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
@@ -587,6 +588,7 @@ do
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index 39b1d248a0..bfc1aa66a6 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -42,10 +42,6 @@ static struct elf_link_hash_entry *find_thumb_glue
PARAMS ((struct bfd_link_info *, const char *, bfd *));
static struct elf_link_hash_entry *find_arm_glue
PARAMS ((struct bfd_link_info *, const char *, bfd *));
-static void record_arm_to_thumb_glue
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static void record_thumb_to_arm_glue
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
static void elf32_arm_post_process_headers
PARAMS ((bfd *, struct bfd_link_info *));
static int elf32_arm_to_thumb_stub
@@ -84,15 +80,22 @@ static struct bfd_hash_entry * elf32_arm_link_hash_newfunc
static void arm_add_to_rel
PARAMS ((bfd *, bfd_byte *, reloc_howto_type *, bfd_signed_vma));
#endif
+static enum elf_reloc_type_class elf32_arm_reloc_type_class
+ PARAMS ((const Elf_Internal_Rela *));
+#ifndef ELFARM_NABI_C_INCLUDED
+static void record_arm_to_thumb_glue
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static void record_thumb_to_arm_glue
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
boolean bfd_elf32_arm_allocate_interworking_sections
PARAMS ((struct bfd_link_info *));
boolean bfd_elf32_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
boolean bfd_elf32_arm_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *, int));
-static enum elf_reloc_type_class elf32_arm_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
+#endif
+
#define INTERWORK_FLAG(abfd) (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK)
@@ -367,6 +370,7 @@ static const insn16 t2a4_bx_insn = 0x4730;
static const insn32 t2a5_pop_insn = 0xe8bd4040;
static const insn32 t2a6_bx_insn = 0xe12fff1e;
+#ifndef ELFARM_NABI_C_INCLUDED
boolean
bfd_elf32_arm_allocate_interworking_sections (info)
struct bfd_link_info * info;
@@ -779,6 +783,7 @@ error_return:
return false;
}
+#endif
/* The thumb form of a long branch is a bit finicky, because the offset
encoding is split over two fields, each in it's own instruction. They
@@ -3609,7 +3614,9 @@ elf32_arm_reloc_type_class (rela)
#define ELF_ARCH bfd_arch_arm
#define ELF_MACHINE_CODE EM_ARM
+#ifndef ELF_MAXPAGESIZE
#define ELF_MAXPAGESIZE 0x8000
+#endif
#define bfd_elf32_bfd_copy_private_bfd_data elf32_arm_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data elf32_arm_merge_private_bfd_data
@@ -3644,3 +3651,4 @@ elf32_arm_reloc_type_class (rela)
#define elf_backend_plt_header_size PLT_ENTRY_SIZE
#include "elf32-target.h"
+
diff --git a/bfd/elfarm-nabi.c b/bfd/elfarm-nabi.c
index 2d791ded9e..1c07dc8ca6 100644
--- a/bfd/elfarm-nabi.c
+++ b/bfd/elfarm-nabi.c
@@ -749,4 +749,6 @@ elf32_arm_nabi_grok_psinfo (abfd, note)
#define elf_backend_grok_prstatus elf32_arm_nabi_grok_prstatus
#define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo
+#ifndef ELFARM_NABI_C_INCLUDED
#include "elf32-arm.h"
+#endif
diff --git a/bfd/elfarmqnx-nabi.c b/bfd/elfarmqnx-nabi.c
new file mode 100644
index 0000000000..006eb52f49
--- /dev/null
+++ b/bfd/elfarmqnx-nabi.c
@@ -0,0 +1,33 @@
+/* 32-bit ELF support for ARM new abi option, for QNX.
+ Copyright 2002 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define ELFARM_NABI_C_INCLUDED
+#include "elfarm-nabi.c"
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_littlearmqnx_vec
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_bigarmqnx_vec
+
+/* QNX Neutrino for ARM has a max pagesize of 0x1000. */
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x1000
+
+#include "elf32-arm.h"
+
diff --git a/bfd/targets.c b/bfd/targets.c
index 13415ada62..dcb055a64d 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -508,6 +508,7 @@ extern const bfd_target bfd_elf32_big_generic_vec;
extern const bfd_target bfd_elf32_bigarc_vec;
extern const bfd_target bfd_elf32_bigarm_oabi_vec;
extern const bfd_target bfd_elf32_bigarm_vec;
+extern const bfd_target bfd_elf32_bigarmqnx_vec;
extern const bfd_target bfd_elf32_bigmips_vec;
extern const bfd_target bfd_elf32_cris_vec;
extern const bfd_target bfd_elf32_d10v_vec;
@@ -531,6 +532,7 @@ extern const bfd_target bfd_elf32_little_generic_vec;
extern const bfd_target bfd_elf32_littlearc_vec;
extern const bfd_target bfd_elf32_littlearm_oabi_vec;
extern const bfd_target bfd_elf32_littlearm_vec;
+extern const bfd_target bfd_elf32_littlearmqnx_vec;
extern const bfd_target bfd_elf32_littlemips_vec;
extern const bfd_target bfd_elf32_m32r_vec;
extern const bfd_target bfd_elf32_m68hc11_vec;
OpenPOWER on IntegriCloud