aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog11
-rw-r--r--bfd/Makefile.am8
-rw-r--r--bfd/Makefile.in8
-rw-r--r--bfd/config.bfd34
-rw-r--r--bfd/targets.c6
5 files changed, 37 insertions, 30 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8dd7dd1..f80ccef 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,14 @@
+2013-06-23 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Move MIPS ELF
+ files to...
+ (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): ...here.
+ * Makefile.in: Regenerate.
+ * config.bfd: Enclose all MIPS ELF targets in #ifdef BFD64.
+ Set want64 to true for them at the end.
+ * targets.c (_bfd_target_vector): Protect MIPS ELF targets with
+ #ifdef BFD64.
+
2013-06-22 Sandra Loosemore <sandra@codesourcery.com>
* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Don't
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 6efe20f..cacf7a3 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -346,7 +346,6 @@ BFD32_BACKENDS = \
elf32-mep.lo \
elf32-metag.lo \
elf32-microblaze.lo \
- elf32-mips.lo \
elf32-moxie.lo \
elf32-msp430.lo \
elf32-mt.lo \
@@ -375,7 +374,6 @@ BFD32_BACKENDS = \
elf32-xtensa.lo \
elf32.lo \
elflink.lo \
- elfxx-mips.lo \
elfxx-sparc.lo \
elfxx-tilegx.lo \
epoc-pe-arm.lo \
@@ -536,7 +534,6 @@ BFD32_BACKENDS_CFILES = \
elf32-mep.c \
elf32-metag.c \
elf32-microblaze.c \
- elf32-mips.c \
elf32-moxie.c \
elf32-msp430.c \
elf32-mt.c \
@@ -565,7 +562,6 @@ BFD32_BACKENDS_CFILES = \
elf32-xtensa.c \
elf32.c \
elflink.c \
- elfxx-mips.c \
elfxx-sparc.c \
elfxx-tilegx.c \
epoc-pe-arm.c \
@@ -650,6 +646,7 @@ BFD64_BACKENDS = \
coff64-rs6000.lo \
demo64.lo \
elf32-ia64.lo \
+ elf32-mips.lo \
elf32-score.lo \
elf32-score7.lo \
elf64-alpha.lo \
@@ -668,6 +665,7 @@ BFD64_BACKENDS = \
elf64.lo \
elfn32-mips.lo \
elfxx-ia64.lo \
+ elfxx-mips.lo \
mach-o-x86-64.lo \
mmo.lo \
nlm32-alpha.lo \
@@ -687,6 +685,7 @@ BFD64_BACKENDS_CFILES = \
coff-x86_64.c \
coff64-rs6000.c \
demo64.c \
+ elf32-mips.c \
elf32-score.c \
elf32-score7.c \
elf64-alpha.c \
@@ -704,6 +703,7 @@ BFD64_BACKENDS_CFILES = \
elf64.c \
elfn32-mips.c \
elfxx-ia64.c \
+ elfxx-mips.c \
mach-o-x86-64.c \
mmo.c \
nlm32-alpha.c \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index e54cf57..0463db6 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -648,7 +648,6 @@ BFD32_BACKENDS = \
elf32-mep.lo \
elf32-metag.lo \
elf32-microblaze.lo \
- elf32-mips.lo \
elf32-moxie.lo \
elf32-msp430.lo \
elf32-mt.lo \
@@ -677,7 +676,6 @@ BFD32_BACKENDS = \
elf32-xtensa.lo \
elf32.lo \
elflink.lo \
- elfxx-mips.lo \
elfxx-sparc.lo \
elfxx-tilegx.lo \
epoc-pe-arm.lo \
@@ -838,7 +836,6 @@ BFD32_BACKENDS_CFILES = \
elf32-mep.c \
elf32-metag.c \
elf32-microblaze.c \
- elf32-mips.c \
elf32-moxie.c \
elf32-msp430.c \
elf32-mt.c \
@@ -867,7 +864,6 @@ BFD32_BACKENDS_CFILES = \
elf32-xtensa.c \
elf32.c \
elflink.c \
- elfxx-mips.c \
elfxx-sparc.c \
elfxx-tilegx.c \
epoc-pe-arm.c \
@@ -953,6 +949,7 @@ BFD64_BACKENDS = \
coff64-rs6000.lo \
demo64.lo \
elf32-ia64.lo \
+ elf32-mips.lo \
elf32-score.lo \
elf32-score7.lo \
elf64-alpha.lo \
@@ -971,6 +968,7 @@ BFD64_BACKENDS = \
elf64.lo \
elfn32-mips.lo \
elfxx-ia64.lo \
+ elfxx-mips.lo \
mach-o-x86-64.lo \
mmo.lo \
nlm32-alpha.lo \
@@ -990,6 +988,7 @@ BFD64_BACKENDS_CFILES = \
coff-x86_64.c \
coff64-rs6000.c \
demo64.c \
+ elf32-mips.c \
elf32-score.c \
elf32-score7.c \
elf64-alpha.c \
@@ -1007,6 +1006,7 @@ BFD64_BACKENDS_CFILES = \
elf64.c \
elfn32-mips.c \
elfxx-ia64.c \
+ elfxx-mips.c \
mach-o-x86-64.c \
mmo.c \
nlm32-alpha.c \
diff --git a/bfd/config.bfd b/bfd/config.bfd
index ebc9d40..8fb1bb8 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -957,6 +957,7 @@ case "${targ}" in
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
;;
+#ifdef BFD64
mips*el-*-netbsd*)
targ_defvec=bfd_elf32_tradlittlemips_vec
targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_little_vec ecoff_big_vec"
@@ -965,6 +966,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
;;
+#endif
mips*-dec-* | mips*el-*-ecoff*)
targ_defvec=ecoff_little_vec
targ_selvecs=ecoff_big_vec
@@ -977,14 +979,11 @@ case "${targ}" in
mips*-*-irix6*)
targ_defvec=bfd_elf32_nbigmips_vec
targ_selvecs="bfd_elf32_nlittlemips_vec bfd_elf32_bigmips_vec bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
- want64=true
;;
mips64*-ps2-elf*)
targ_defvec=bfd_elf32_nlittlemips_vec
targ_selvecs="bfd_elf32_nlittlemips_vec bfd_elf32_nbigmips_vec bfd_elf32_bigmips_vec bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
- want64=true
;;
-#endif
mips*-ps2-elf*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
@@ -993,6 +992,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
+#endif
mips*-sgi-* | mips*-*-bsd*)
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
@@ -1001,10 +1001,12 @@ case "${targ}" in
targ_defvec=ecoff_biglittle_vec
targ_selvecs="ecoff_little_vec ecoff_big_vec"
;;
+#ifdef BFD64
mips*-*-sysv4*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
;;
+#endif
mips*-*-sysv* | mips*-*-riscos*)
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
@@ -1013,23 +1015,18 @@ case "${targ}" in
mips*el-*-vxworks*)
targ_defvec=bfd_elf32_littlemips_vxworks_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf32_bigmips_vxworks_vec bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
- want64=true
;;
mips*-*-vxworks*)
targ_defvec=bfd_elf32_bigmips_vxworks_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf32_littlemips_vxworks_vec bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
- want64=true
;;
-#endif
mips*el-sde-elf*)
targ_defvec=bfd_elf32_tradlittlemips_vec
targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
- want64=true
;;
mips*-sde-elf* | mips*-mti-elf*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
- want64=true
;;
mips*el-*-elf* | mips*el-*-vxworks* | mips*-*-chorus*)
targ_defvec=bfd_elf32_littlemips_vec
@@ -1043,13 +1040,10 @@ case "${targ}" in
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
-#ifdef BFD64
mips64*-*-openbsd*)
targ_defvec=bfd_elf64_tradbigmips_vec
targ_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
- want64=true
;;
-#endif
mips*el-*-openbsd*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec"
@@ -1058,26 +1052,21 @@ case "${targ}" in
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
-#ifdef BFD64
mips64*el-*-linux*)
targ_defvec=bfd_elf32_ntradlittlemips_vec
targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
- want64=true
;;
mips64*-*-linux*)
targ_defvec=bfd_elf32_ntradbigmips_vec
targ_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
- want64=true
;;
mips*el-*-linux*)
targ_defvec=bfd_elf32_tradlittlemips_vec
targ_selvecs="bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec"
- want64=true
;;
mips*-*-linux*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec"
- want64=true
;;
mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
# FreeBSD vectors
@@ -1085,7 +1074,6 @@ case "${targ}" in
targ_selvecs="bfd_elf32_ntradbigmips_freebsd_vec bfd_elf32_tradlittlemips_freebsd_vec bfd_elf32_tradbigmips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec"
# Generic vectors
targ_selvecs="${targ_selvecs} bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
- want64=true
;;
mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu)
# FreeBSD vectors
@@ -1093,16 +1081,13 @@ case "${targ}" in
targ_selvecs="bfd_elf32_ntradlittlemips_freebsd_vec bfd_elf32_tradbigmips_freebsd_vec bfd_elf32_tradlittlemips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec"
# Generic vectors
targ_selvecs="${targ_selvecs} bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
- want64=true
;;
-#endif
mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu)
# FreeBSD vectors
targ_defvec=bfd_elf32_tradlittlemips_freebsd_vec
targ_selvecs="bfd_elf32_tradbigmips_freebsd_vec bfd_elf32_ntradlittlemips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec bfd_elf32_ntradbigmips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec"
# Generic vectors
targ_selvecs="${targ_selvecs} bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec"
- want64=true
;;
mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
# FreeBSD vectors
@@ -1110,9 +1095,7 @@ case "${targ}" in
targ_selvecs="bfd_elf32_tradlittlemips_freebsd_vec bfd_elf32_ntradbigmips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec bfd_elf32_ntradlittlemips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec"
# Generic vectors
targ_selvecs="${targ_selvecs} bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec"
- want64=true
;;
-#ifdef BFD64
mmix-*-*)
targ_defvec=bfd_elf64_mmix_vec
targ_selvecs=bfd_mmo_vec
@@ -1711,6 +1694,13 @@ case "${targ}" in
;;
esac
+# All MIPS ELF targets need a 64-bit bfd_vma.
+case "${targ_defvec} ${targ_selvecs}" in
+ *elf*mips*)
+ want64=true
+ ;;
+esac
+
case "${host64}${want64}" in
*true*)
targ_selvecs="${targ_selvecs} ${targ64_selvecs}"
diff --git a/bfd/targets.c b/bfd/targets.c
index c6794ee..e716c3b 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -982,8 +982,10 @@ static const bfd_target * const _bfd_target_vector[] =
&bfd_elf32_bigarm_vec,
&bfd_elf32_bigarm_symbian_vec,
&bfd_elf32_bigarm_vxworks_vec,
+#ifdef BFD64
&bfd_elf32_bigmips_vec,
&bfd_elf32_bigmips_vxworks_vec,
+#endif
&bfd_elf32_bigmoxie_vec,
&bfd_elf32_bignios2_vec,
&bfd_elf32_cr16_vec,
@@ -1024,8 +1026,10 @@ static const bfd_target * const _bfd_target_vector[] =
&bfd_elf32_littlearm_vec,
&bfd_elf32_littlearm_symbian_vec,
&bfd_elf32_littlearm_vxworks_vec,
+#ifdef BFD64
&bfd_elf32_littlemips_vec,
&bfd_elf32_littlemips_vxworks_vec,
+#endif
&bfd_elf32_littlemoxie_vec,
&bfd_elf32_littlenios2_vec,
&bfd_elf32_m32c_vec,
@@ -1100,10 +1104,12 @@ static const bfd_target * const _bfd_target_vector[] =
&bfd_elf32_tilegx_be_vec,
&bfd_elf32_tilegx_le_vec,
&bfd_elf32_tilepro_vec,
+#ifdef BFD64
&bfd_elf32_tradbigmips_vec,
&bfd_elf32_tradlittlemips_vec,
&bfd_elf32_tradbigmips_freebsd_vec,
&bfd_elf32_tradlittlemips_freebsd_vec,
+#endif
&bfd_elf32_us_cris_vec,
&bfd_elf32_v850_vec,
&bfd_elf32_v850_rh850_vec,