bfd/
authorRichard Sandiford <rdsandiford@googlemail.com>
Fri, 31 Dec 2010 11:01:00 +0000 (11:01 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Fri, 31 Dec 2010 11:01:00 +0000 (11:01 +0000)
2010-12-23  Robert Millan  <rmh@gnu.org>

* config.bfd: Recognize mips-freebsd and mips-kfreebsd-gnu.
* configure.host: Likewise.
* configure.in: Support for `bfd_elf32_ntradbigmips_freebsd_vec',
`bfd_elf32_ntradlittlemips_freebsd_vec',
`bfd_elf32_tradbigmips_freebsd_vec',
`bfd_elf32_tradlittlemips_freebsd_vec',
`bfd_elf64_tradbigmips_freebsd_vec' and
`bfd_elf64_tradlittlemips_freebsd_vec'.
* configure: Regenerate.
* elf32-mips.c: New target for FreeBSD support
(same as traditional MIPS but overrides ELF_OSABI
with ELFOSABI_FREEBSD).
* elf64-mips.c: Likewise.
* elfn32-mips.c: Likewise.
* targets.c (_bfd_target_vector): Add
`bfd_elf32_ntradbigmips_freebsd_vec',
`bfd_elf32_ntradlittlemips_freebsd_vec',
`bfd_elf32_tradbigmips_freebsd_vec',
`bfd_elf32_tradlittlemips_freebsd_vec',
`bfd_elf64_tradbigmips_freebsd_vec' and
`bfd_elf64_tradlittlemips_freebsd_vec'.

ld/
2010-12-14  Robert Millan  <rmh@gnu.org>

* configure.tgt: Recognize mips-freebsd and mips-kfreebsd-gnu.

* emulparams/elf32btsmip_fbsd.sh: New file.
* emulparams/elf32btsmipn32_fbsd.sh: Likewise.
* emulparams/elf32ltsmip_fbsd.sh: Likewise.
* emulparams/elf32ltsmipn32_fbsd.sh: Likewise.
* emulparams/elf64btsmip_fbsd.sh: Likewise.
* emulparams/elf64ltsmip_fbsd.sh: Likewise.

* Makefile.am: Add build rules for `eelf32btsmip_fbsd.c',
`eelf32btsmipn32_fbsd.c', `eelf32ltsmip_fbsd.c',
`eelf32ltsmipn32_fbsd.c', `eelf64btsmip_fbsd.c' and
`eelf64ltsmip_fbsd.c'.
* Makefile.in: Regenerate.

gas/
2010-12-19  Robert Millan  <rmh@gnu.org>
    Richard Sandiford  <rdsandiford@googlemail.com>

* config/tc-mips.c (ELF_TARGET): New macro.  Generates target
names accordingly to whether TE_FreeBSD and whether TE_TMIPS
are defined.
(mips_target_format): Refactor code using ELF_TARGET().
(support_64bit_objects): Likewise.

* configure.in: Recognize mips-freebsd and mips-kfreebsd-gnu.
* configure.tgt: Likewise.
* configure: Regenerate.

binutils/testsuite/
* binutils-all/readelf.exp: Handle MIPS FreeBSD targets.

gas/testsuite/
* gas/mips/e32el-rel2.d: Accept any file format.
* gas/mips/elf-rel.d: Likewise.
* gas/mips/elf-rel2.d: Likewise.
* gas/mips/elf-rel3.d: Likewise.
* gas/mips/elfel-rel.d: Likewise.
* gas/mips/elfel-rel2.d: Likewise.
* gas/mips/elfel-rel3.d: Likewise.
* gas/mips/ldstla-32-mips3-shared.d: Likewise.
* gas/mips/ldstla-32-mips3.d: Likewise.
* gas/mips/ldstla-32-shared.d: Likewise.
* gas/mips/ldstla-32.d: Likewise.
* gas/mips/ldstla-n64-shared.d: Likewise.
* gas/mips/ldstla-n64.d: Likewise.
* gas/mips/noat-1.d: Likewise.
* gas/mips/set-arch.d: Likewise.
* gas/mips/tls-o32.d: Likewise.

ld/testsuite/
* ld-mips-elf/mips-elf-flags.exp: Handle FreeBSD targets.
* ld-mips-elf/mips-elf.exp: Likewise.
* ld-mips-elf/mips16-call-global.d: Accept any file format.
* ld-mips-elf/mips16-intermix.d: Likewise.

48 files changed:
bfd/ChangeLog
bfd/config.bfd
bfd/configure
bfd/configure.host
bfd/configure.in
bfd/elf32-mips.c
bfd/elf64-mips.c
bfd/elfn32-mips.c
bfd/targets.c
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/readelf.exp
gas/ChangeLog
gas/config/tc-mips.c
gas/configure
gas/configure.in
gas/configure.tgt
gas/testsuite/ChangeLog
gas/testsuite/gas/mips/e32el-rel2.d
gas/testsuite/gas/mips/elf-rel.d
gas/testsuite/gas/mips/elf-rel2.d
gas/testsuite/gas/mips/elf-rel3.d
gas/testsuite/gas/mips/elfel-rel.d
gas/testsuite/gas/mips/elfel-rel2.d
gas/testsuite/gas/mips/elfel-rel3.d
gas/testsuite/gas/mips/ldstla-32-mips3-shared.d
gas/testsuite/gas/mips/ldstla-32-mips3.d
gas/testsuite/gas/mips/ldstla-32-shared.d
gas/testsuite/gas/mips/ldstla-32.d
gas/testsuite/gas/mips/ldstla-n64-shared.d
gas/testsuite/gas/mips/ldstla-n64.d
gas/testsuite/gas/mips/noat-1.d
gas/testsuite/gas/mips/set-arch.d
gas/testsuite/gas/mips/tls-o32.d
ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/configure.tgt
ld/emulparams/elf32btsmip_fbsd.sh [new file with mode: 0644]
ld/emulparams/elf32btsmipn32_fbsd.sh [new file with mode: 0644]
ld/emulparams/elf32ltsmip_fbsd.sh [new file with mode: 0644]
ld/emulparams/elf32ltsmipn32_fbsd.sh [new file with mode: 0644]
ld/emulparams/elf64btsmip_fbsd.sh [new file with mode: 0644]
ld/emulparams/elf64ltsmip_fbsd.sh [new file with mode: 0644]
ld/testsuite/ChangeLog
ld/testsuite/ld-mips-elf/mips-elf-flags.exp
ld/testsuite/ld-mips-elf/mips-elf.exp
ld/testsuite/ld-mips-elf/mips16-call-global.d
ld/testsuite/ld-mips-elf/mips16-intermix.d

index 7899936751073cde2e282dd633f62ea7fdb79327..c486f58270deba9b6055deaeee99b416626ad252 100644 (file)
@@ -1,3 +1,27 @@
+2010-12-31  Robert Millan  <rmh@gnu.org>
+
+       * config.bfd: Recognize mips-freebsd and mips-kfreebsd-gnu.
+       * configure.host: Likewise.
+       * configure.in: Support for `bfd_elf32_ntradbigmips_freebsd_vec',
+       `bfd_elf32_ntradlittlemips_freebsd_vec',
+       `bfd_elf32_tradbigmips_freebsd_vec',
+       `bfd_elf32_tradlittlemips_freebsd_vec',
+       `bfd_elf64_tradbigmips_freebsd_vec' and
+       `bfd_elf64_tradlittlemips_freebsd_vec'.
+       * configure: Regenerate.
+       * elf32-mips.c: New target for FreeBSD support
+       (same as traditional MIPS but overrides ELF_OSABI
+       with ELFOSABI_FREEBSD).
+       * elf64-mips.c: Likewise.
+       * elfn32-mips.c: Likewise.
+       * targets.c (_bfd_target_vector): Add
+       `bfd_elf32_ntradbigmips_freebsd_vec',
+       `bfd_elf32_ntradlittlemips_freebsd_vec',
+       `bfd_elf32_tradbigmips_freebsd_vec',
+       `bfd_elf32_tradlittlemips_freebsd_vec',
+       `bfd_elf64_tradbigmips_freebsd_vec' and
+       `bfd_elf64_tradlittlemips_freebsd_vec'.
+
 2010-12-30  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elfcode.h (NAME(elf,r_info)): New.
index 21619192ed9a9570c0c605552c3eda9ae8e3178b..01fa09abc09377db31ba653e78c3f981d20a0e1b 100644 (file)
@@ -1015,6 +1015,40 @@ case "${targ}" in
     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
     ;;
+#ifdef BFD64
+  mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
+    # FreeBSD vectors
+    targ_defvec=bfd_elf32_ntradlittlemips_freebsd_vec
+    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
+    targ_defvec=bfd_elf32_ntradbigmips_freebsd_vec
+    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
+    targ_defvec=bfd_elf32_tradbigmips_freebsd_vec
+    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
index 2263aa872b9093a28ba663284b545bda7b3a6608..508558094864425e118110b8e1d3de02bcec7542 100755 (executable)
     bfd_elf32_msp430_vec)      tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
     bfd_elf32_nbigmips_vec)    tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf32_ntradbigmips_vec)        tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradbigmips_vec | bfd_elf32_ntradbigmips_freebsd_vec)
+                               tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradlittlemips_vec | bfd_elf32_ntradlittlemips_freebsd_vec)
+                               tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_openrisc_vec)    tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
     bfd_elf32_or32_big_vec)    tb="$tb elf32-or32.lo elf32.lo $elf" ;;
     bfd_elf32_pj_vec)           tb="$tb elf32-pj.lo elf32.lo $elf";;
     bfd_elf32_spu_vec)         tb="$tb elf32-spu.lo elf32.lo $elf" ;;
     bfd_elf32_tic6x_be_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
     bfd_elf32_tic6x_le_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
-    bfd_elf32_tradbigmips_vec)  tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
-    bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+    bfd_elf32_tradbigmips_vec | bfd_elf32_tradbigmips_freebsd_vec)
+                               tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+    bfd_elf32_tradlittlemips_vec | bfd_elf32_tradlittlemips_freebsd_vec)
+                               tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
     bfd_elf32_us_cris_vec)     tb="$tb elf32-cris.lo elf32.lo $elf" ;;
     bfd_elf32_v850_vec)                tb="$tb elf32-v850.lo elf32.lo $elf" ;;
     bfd_elf32_vax_vec)         tb="$tb elf32-vax.lo elf32.lo $elf" ;;
     bfd_elf64_sparc_vec)       tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_sparc_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf64_tradbigmips_vec | bfd_elf64_tradbigmips_freebsd_vec)
+                               tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec)
+                               tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_x86_64_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
index eb7bfe9e3dd25939461eb4f5a1024350a091ccad..7c63de58397426d08501dd7a0fd527cb59a9809c 100644 (file)
@@ -50,6 +50,7 @@ mips*-sgi-irix3*)     HDEFINES="-G 4" ;;
 mips*-sgi-irix4*)      HDEFINES="-G 4" ;;
 mips*-sgi-irix6*)      host64=true;;
 mips64*-*-linux*)      host64=true;;
+mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu) host64=true;;
 mips*-*-sysv4*)                ;;
 mips*-*-sysv*)         HDEFINES="-G 4" ;;
 mips*-*-riscos*)       HDEFINES="-G 4" ;;
index 42b6017af166b60c9d59c6f35f97b6e5f45be6cb..5908a57207bad040f9db6c81a18cff7c0c2cf159 100644 (file)
@@ -748,8 +748,10 @@ do
     bfd_elf32_msp430_vec)      tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
     bfd_elf32_nbigmips_vec)    tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf32_ntradbigmips_vec)        tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradbigmips_vec | bfd_elf32_ntradbigmips_freebsd_vec)
+                               tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradlittlemips_vec | bfd_elf32_ntradlittlemips_freebsd_vec)
+                               tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_openrisc_vec)    tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
     bfd_elf32_or32_big_vec)    tb="$tb elf32-or32.lo elf32.lo $elf" ;;
     bfd_elf32_pj_vec)           tb="$tb elf32-pj.lo elf32.lo $elf";;
@@ -788,8 +790,10 @@ do
     bfd_elf32_spu_vec)         tb="$tb elf32-spu.lo elf32.lo $elf" ;;
     bfd_elf32_tic6x_be_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
     bfd_elf32_tic6x_le_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
-    bfd_elf32_tradbigmips_vec)  tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
-    bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+    bfd_elf32_tradbigmips_vec | bfd_elf32_tradbigmips_freebsd_vec)
+                               tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+    bfd_elf32_tradlittlemips_vec | bfd_elf32_tradlittlemips_freebsd_vec)
+                               tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
     bfd_elf32_us_cris_vec)     tb="$tb elf32-cris.lo elf32.lo $elf" ;;
     bfd_elf32_v850_vec)                tb="$tb elf32-v850.lo elf32.lo $elf" ;;
     bfd_elf32_vax_vec)         tb="$tb elf32-vax.lo elf32.lo $elf" ;;
@@ -822,8 +826,10 @@ do
     bfd_elf64_sparc_vec)       tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_sparc_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf64_tradbigmips_vec | bfd_elf64_tradbigmips_freebsd_vec)
+                               tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec)
+                               tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_x86_64_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
index aed0b4c974234920a35c814ac5d55aa2a36ab094..33922077558088d90ae2833962d548064d675156 100644 (file)
@@ -1725,6 +1725,37 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
 /* Include the target file again for this target.  */
 #include "elf32-target.h"
 
+/* FreeBSD support.  */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#define        TARGET_LITTLE_SYM               bfd_elf32_tradlittlemips_freebsd_vec
+#define        TARGET_LITTLE_NAME              "elf32-tradlittlemips-freebsd"
+#define        TARGET_BIG_SYM                  bfd_elf32_tradbigmips_freebsd_vec
+#define        TARGET_BIG_NAME                 "elf32-tradbigmips-freebsd"
+
+#undef ELF_OSABI
+#define        ELF_OSABI                       ELFOSABI_FREEBSD
+
+/* The kernel recognizes executables as valid only if they carry a
+   "FreeBSD" label in the ELF header.  So we put this label on all
+   executables and (for simplicity) also all other object files.  */
+
+static void
+elf_fbsd_post_process_headers (bfd *abfd, struct bfd_link_info *info)
+{
+  _bfd_elf_set_osabi (abfd, info);
+}
+
+#undef elf_backend_post_process_headers
+#define        elf_backend_post_process_headers        elf_fbsd_post_process_headers
+#undef elf32_bed
+#define elf32_bed                              elf32_fbsd_tradbed
+
+#include "elf32-target.h"
 /* Implement elf_backend_final_write_processing for VxWorks.  */
 
 static void
index 7ed54fac78a4067939ce66190c4004b9623356ac..3eeb341c0d2f044cebd900664d67263ca76dfe4a 100644 (file)
@@ -3354,3 +3354,36 @@ extern bfd_boolean bfd_elf64_archive_write_armap
 
 /* Include the target file again for this target.  */
 #include "elf64-target.h"
+
+
+/* FreeBSD support.  */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#define        TARGET_LITTLE_SYM               bfd_elf64_tradlittlemips_freebsd_vec
+#define        TARGET_LITTLE_NAME              "elf64-tradlittlemips-freebsd"
+#define        TARGET_BIG_SYM                  bfd_elf64_tradbigmips_freebsd_vec
+#define        TARGET_BIG_NAME                 "elf64-tradbigmips-freebsd"
+
+#undef ELF_OSABI
+#define        ELF_OSABI                       ELFOSABI_FREEBSD
+
+/* The kernel recognizes executables as valid only if they carry a
+   "FreeBSD" label in the ELF header.  So we put this label on all
+   executables and (for simplicity) also all other object files.  */
+
+static void
+elf_fbsd_post_process_headers (bfd *abfd, struct bfd_link_info *info)
+{
+  _bfd_elf_set_osabi (abfd, info);
+}
+
+#undef elf_backend_post_process_headers
+#define        elf_backend_post_process_headers        elf_fbsd_post_process_headers
+#undef elf64_bed
+#define elf64_bed                              elf64_fbsd_tradbed
+
+#include "elf64-target.h"
index 8338bbb3814469beaf4735e782edaaecfb1bfe82..da186218a7ef08dc2795d0fdef738d6b787dc0d9 100644 (file)
@@ -2547,3 +2547,36 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
 
 /* Include the target file again for this target.  */
 #include "elf32-target.h"
+
+
+/* FreeBSD support.  */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#define        TARGET_LITTLE_SYM               bfd_elf32_ntradlittlemips_freebsd_vec
+#define        TARGET_LITTLE_NAME              "elf32-ntradlittlemips-freebsd"
+#define        TARGET_BIG_SYM                  bfd_elf32_ntradbigmips_freebsd_vec
+#define        TARGET_BIG_NAME                 "elf32-ntradbigmips-freebsd"
+
+#undef ELF_OSABI
+#define        ELF_OSABI                       ELFOSABI_FREEBSD
+
+/* The kernel recognizes executables as valid only if they carry a
+   "FreeBSD" label in the ELF header.  So we put this label on all
+   executables and (for simplicity) also all other object files.  */
+
+static void
+elf_fbsd_post_process_headers (bfd *abfd, struct bfd_link_info *info)
+{
+  _bfd_elf_set_osabi (abfd, info);
+}
+
+#undef elf_backend_post_process_headers
+#define        elf_backend_post_process_headers        elf_fbsd_post_process_headers
+#undef elf32_bed
+#define elf32_bed                              elf32_fbsd_tradbed
+
+#include "elf32-target.h"
index 13bfe9e3c61e950c1d7f8afbdd3df73fbd3b1f33..e491c93ee8aba15c77a238d5adacde90307a7b57 100644 (file)
@@ -646,6 +646,8 @@ extern const bfd_target bfd_elf32_nbigmips_vec;
 extern const bfd_target bfd_elf32_nlittlemips_vec;
 extern const bfd_target bfd_elf32_ntradbigmips_vec;
 extern const bfd_target bfd_elf32_ntradlittlemips_vec;
+extern const bfd_target bfd_elf32_ntradbigmips_freebsd_vec;
+extern const bfd_target bfd_elf32_ntradlittlemips_freebsd_vec;
 extern const bfd_target bfd_elf32_openrisc_vec;
 extern const bfd_target bfd_elf32_or32_big_vec;
 extern const bfd_target bfd_elf32_pj_vec;
@@ -683,6 +685,8 @@ extern const bfd_target bfd_elf32_tic6x_be_vec;
 extern const bfd_target bfd_elf32_tic6x_le_vec;
 extern const bfd_target bfd_elf32_tradbigmips_vec;
 extern const bfd_target bfd_elf32_tradlittlemips_vec;
+extern const bfd_target bfd_elf32_tradbigmips_freebsd_vec;
+extern const bfd_target bfd_elf32_tradlittlemips_freebsd_vec;
 extern const bfd_target bfd_elf32_us_cris_vec;
 extern const bfd_target bfd_elf32_v850_vec;
 extern const bfd_target bfd_elf32_vax_vec;
@@ -717,6 +721,8 @@ extern const bfd_target bfd_elf64_sparc_freebsd_vec;
 extern const bfd_target bfd_elf64_sparc_sol2_vec;
 extern const bfd_target bfd_elf64_tradbigmips_vec;
 extern const bfd_target bfd_elf64_tradlittlemips_vec;
+extern const bfd_target bfd_elf64_tradbigmips_freebsd_vec;
+extern const bfd_target bfd_elf64_tradlittlemips_freebsd_vec;
 extern const bfd_target bfd_elf64_x86_64_freebsd_vec;
 extern const bfd_target bfd_elf64_x86_64_sol2_vec;
 extern const bfd_target bfd_elf64_x86_64_vec;
@@ -993,6 +999,8 @@ static const bfd_target * const _bfd_target_vector[] =
        &bfd_elf32_nlittlemips_vec,
        &bfd_elf32_ntradbigmips_vec,
        &bfd_elf32_ntradlittlemips_vec,
+       &bfd_elf32_ntradbigmips_freebsd_vec,
+       &bfd_elf32_ntradlittlemips_freebsd_vec,
 #endif
        &bfd_elf32_openrisc_vec,
        &bfd_elf32_or32_big_vec,
@@ -1035,6 +1043,8 @@ static const bfd_target * const _bfd_target_vector[] =
        &bfd_elf32_tic6x_le_vec,
        &bfd_elf32_tradbigmips_vec,
        &bfd_elf32_tradlittlemips_vec,
+       &bfd_elf32_tradbigmips_freebsd_vec,
+       &bfd_elf32_tradlittlemips_freebsd_vec,
        &bfd_elf32_us_cris_vec,
        &bfd_elf32_v850_vec,
        &bfd_elf32_vax_vec,
@@ -1070,6 +1080,8 @@ static const bfd_target * const _bfd_target_vector[] =
        &bfd_elf64_sparc_sol2_vec,
        &bfd_elf64_tradbigmips_vec,
        &bfd_elf64_tradlittlemips_vec,
+       &bfd_elf64_tradbigmips_freebsd_vec,
+       &bfd_elf64_tradlittlemips_freebsd_vec,
        &bfd_elf64_x86_64_freebsd_vec,
        &bfd_elf64_x86_64_sol2_vec,
        &bfd_elf64_x86_64_vec,
index 1e5801b956d56183e49a16ae783e9fdd49a85392..ca7f826807cae52c57089f8d9df058d62bb362f3 100644 (file)
@@ -1,3 +1,7 @@
+2010-12-31  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * binutils-all/readelf.exp: Handle MIPS FreeBSD targets.
+
 2010-12-09  Maciej W. Rozycki  <macro@codesourcery.com>
 
        * lib/binutils-common.exp (regexp_diff): Implement inverse
index 66aab79efeccf16b4987ebe86937c036980b724e..8b68aececd47a2796e530c9033ba417313c384bb 100644 (file)
@@ -101,7 +101,9 @@ proc readelf_test { options binary_file regexp_file xfails } {
 
     set target_machine ""
     if [istarget "mips*-*-*"] then {
-       if { [istarget "mips*-*-*linux*"] || [istarget "mips*-sde-elf*"] } then {
+       if { [istarget "mips*-*-*linux*"]
+            || [istarget "mips*-sde-elf*"]
+            || [istarget "mips*-*freebsd*"] } then {
            set target_machine tmips
        } else {
            set target_machine mips
index 2864c79be03dc4a81d817a4eb5ba2db52c664c18..19d0477f539e90612de9d096f85ff729a4ae4829 100644 (file)
@@ -1,3 +1,16 @@
+2010-12-31  Robert Millan  <rmh@gnu.org>
+           Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * config/tc-mips.c (ELF_TARGET): New macro.  Generates target
+       names accordingly to whether TE_FreeBSD and whether TE_TMIPS
+       are defined.
+       (mips_target_format): Refactor code using ELF_TARGET().
+       (support_64bit_objects): Likewise.
+
+       * configure.in: Recognize mips-freebsd and mips-kfreebsd-gnu.
+       * configure.tgt: Likewise.
+       * configure: Regenerate.
+
 2010-12-30  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-i386.c (x86_elf_abi): New.
index 20bf431c027d321cfa15a83f7c61a26b914d9c9c..ee9b276c3d9a794524cf93be0368ada4ab38ad0d 100644 (file)
@@ -1313,6 +1313,14 @@ static segT pdr_seg;
 
 /* The default target format to use.  */
 
+#if defined (TE_FreeBSD)
+#define ELF_TARGET(PREFIX, ENDIAN) PREFIX "trad" ENDIAN "mips-freebsd"
+#elif defined (TE_TMIPS)
+#define ELF_TARGET(PREFIX, ENDIAN) PREFIX "trad" ENDIAN "mips"
+#else
+#define ELF_TARGET(PREFIX, ENDIAN) PREFIX ENDIAN "mips"
+#endif
+
 const char *
 mips_target_format (void)
 {
@@ -1329,28 +1337,17 @@ mips_target_format (void)
                ? "elf32-bigmips-vxworks"
                : "elf32-littlemips-vxworks");
 #endif
-#ifdef TE_TMIPS
-      /* This is traditional mips.  */
-      return (target_big_endian
-             ? (HAVE_64BIT_OBJECTS
-                ? "elf64-tradbigmips"
-                : (HAVE_NEWABI
-                   ? "elf32-ntradbigmips" : "elf32-tradbigmips"))
-             : (HAVE_64BIT_OBJECTS
-                ? "elf64-tradlittlemips"
-                : (HAVE_NEWABI
-                   ? "elf32-ntradlittlemips" : "elf32-tradlittlemips")));
-#else
       return (target_big_endian
              ? (HAVE_64BIT_OBJECTS
-                ? "elf64-bigmips"
+                ? ELF_TARGET ("elf64-", "big")
                 : (HAVE_NEWABI
-                   ? "elf32-nbigmips" : "elf32-bigmips"))
+                   ? ELF_TARGET ("elf32-n", "big")
+                   : ELF_TARGET ("elf32-", "big")))
              : (HAVE_64BIT_OBJECTS
-                ? "elf64-littlemips"
+                ? ELF_TARGET ("elf64-", "little")
                 : (HAVE_NEWABI
-                   ? "elf32-nlittlemips" : "elf32-littlemips")));
-#endif
+                   ? ELF_TARGET ("elf32-n", "little")
+                   : ELF_TARGET ("elf32-", "little"))));
     default:
       abort ();
       return NULL;
@@ -11264,14 +11261,8 @@ static int support_64bit_objects(void)
 
   list = bfd_target_list ();
   for (l = list; *l != NULL; l++)
-#ifdef TE_TMIPS
-    /* This is traditional mips */
-    if (strcmp (*l, "elf64-tradbigmips") == 0
-       || strcmp (*l, "elf64-tradlittlemips") == 0)
-#else
-    if (strcmp (*l, "elf64-bigmips") == 0
-       || strcmp (*l, "elf64-littlemips") == 0)
-#endif
+    if (strcmp (*l, ELF_TARGET ("elf64-", "big")) == 0
+       || strcmp (*l, ELF_TARGET ("elf64-", "little")) == 0)
       break;
   yes = (*l != NULL);
   free (list);
index d5431f28cd0a0aacda783d7df3e8fe059585f733..0c0071fb26ca667e57ff15fc6b3c73f64e53d53c 100755 (executable)
@@ -12084,10 +12084,10 @@ _ACEOF
        esac
        # Decide which ABI to target by default.
        case ${target} in
-         mips64*-linux* | mips-sgi-irix6*)
+         mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu)
            mips_default_abi=N32_ABI
            ;;
-         mips*-linux*)
+         mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu)
            mips_default_abi=O32_ABI
            ;;
          mips64*-openbsd*)
@@ -12251,7 +12251,8 @@ _ACEOF
 
     case ${generic_target}-${fmt} in
       mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
-      mips*-*-linux*-*) case "$endian" in
+      mips*-*-linux*-* | mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
+                       case "$endian" in
                        big)    emulation="mipsbelf mipslelf mipself" ;;
                        *)      emulation="mipslelf mipsbelf mipself" ;;
                        esac ;;
index c11d1dfe7250dca36e71ed7ffd290907deb7fdd7..69f5fcb33ed6a337a33cc39b1132b14025d3b637 100644 (file)
@@ -250,10 +250,10 @@ changequote([,])dnl
        esac
        # Decide which ABI to target by default.
        case ${target} in
-         mips64*-linux* | mips-sgi-irix6*)
+         mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu)
            mips_default_abi=N32_ABI
            ;;
-         mips*-linux*)
+         mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu)
            mips_default_abi=O32_ABI
            ;;
          mips64*-openbsd*)
@@ -401,7 +401,8 @@ changequote([,])dnl
 
     case ${generic_target}-${fmt} in
       mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
-      mips*-*-linux*-*) case "$endian" in
+      mips*-*-linux*-* | mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
+                       case "$endian" in
                        big)    emulation="mipsbelf mipslelf mipself" ;;
                        *)      emulation="mipslelf mipsbelf mipself" ;;
                        esac ;;
index c05a64a238267b4283537366a348e7dfe1254f69..8ce9003c894d7871f353cdeb59f074eebcc32fc0 100644 (file)
@@ -290,6 +290,8 @@ case ${generic_target} in
   mips-*-lnews*)                       fmt=ecoff em=lnews ;;
   mips-*-riscos*)                      fmt=ecoff ;;
   mips*-*-linux*)                      fmt=elf em=tmips ;;
+  mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
+                                       fmt=elf em=freebsd ;;
   mips-*-sysv4*MP* | mips-*-gnu*)      fmt=elf em=tmips ;;
   mips*-sde-elf*)                      fmt=elf em=tmips ;;
   mips-*-sysv*)                                fmt=ecoff ;;
index ee3f7bc09a64c1dfc5cc4f9e1843e1c2d9085067..cb8306526be3f734212aefec3bc80287a3b3e835 100644 (file)
@@ -1,3 +1,22 @@
+2010-12-31  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * gas/mips/e32el-rel2.d: Accept any file format.
+       * gas/mips/elf-rel.d: Likewise.
+       * gas/mips/elf-rel2.d: Likewise.
+       * gas/mips/elf-rel3.d: Likewise.
+       * gas/mips/elfel-rel.d: Likewise.
+       * gas/mips/elfel-rel2.d: Likewise.
+       * gas/mips/elfel-rel3.d: Likewise.
+       * gas/mips/ldstla-32-mips3-shared.d: Likewise.
+       * gas/mips/ldstla-32-mips3.d: Likewise.
+       * gas/mips/ldstla-32-shared.d: Likewise.
+       * gas/mips/ldstla-32.d: Likewise.
+       * gas/mips/ldstla-n64-shared.d: Likewise.
+       * gas/mips/ldstla-n64.d: Likewise.
+       * gas/mips/noat-1.d: Likewise.
+       * gas/mips/set-arch.d: Likewise.
+       * gas/mips/tls-o32.d: Likewise.
+
 2010-12-30  H.J. Lu  <hongjiu.lu@intel.com>
 
        * gas/i386/ilp32/lns/ilp32.exp: New.
index 4d5e9809097eb33b20fe4f1b013744c098a7ee14..abfcc57eb211c99cd1f1fd6a3fcbb380ad7f7c45 100644 (file)
@@ -7,7 +7,7 @@
 # FIXME: really this should check that the contents of .sdata, .lit4,
 # and .lit8 are correct too.
 
-.*:     file format elf.*mips
+.*:     file format .*
 
 RELOCATION RECORDS FOR \[\.text\]:
 OFFSET [ ]+ TYPE              VALUE 
index d6cee3c1b197a8723ecb7d9aa8f86ed012bae3d6..6208fac23e4bc21221f56d587c27a97fba985f5a 100644 (file)
@@ -4,7 +4,7 @@
 
 # Test the HI16/LO16 generation.
 
-.*:     file format elf.*mips
+.*:     file format .*
 
 RELOCATION RECORDS FOR \[\.text\]:
 OFFSET [ ]+ TYPE              VALUE 
index 4bd9cee63fa50b57c2edb8d6d46e25da112fb2db..8ca682f28c2f9f5d1733ce756dbe9b0da8763fe0 100644 (file)
@@ -6,7 +6,7 @@
 # FIXME: really this should check that the contents of .sdata, .lit4,
 # and .lit8 are correct too.
 
-.*:     file format elf.*mips
+.*:     file format .*
 
 RELOCATION RECORDS FOR \[\.text\]:
 OFFSET [ ]+ TYPE              VALUE 
index 51dc0af98c7eb733b652630b80db3122a591cc0a..bfa9c40335b91f432f5817bbe4a57bd5787693cb 100644 (file)
@@ -2,7 +2,7 @@
 #name: MIPS ELF reloc 3
 #as: -32
 
-.*:     file format elf.*mips
+.*:     file format .*
 
 RELOCATION RECORDS FOR \[\.data\]:
 OFFSET [ ]+ TYPE              VALUE 
index a597212e0c43af25cc89038a107ee4eaf02edab8..bac44edbef8c6a2d4e4e9a26fe3b72340df95521 100644 (file)
@@ -5,7 +5,7 @@
 
 # Test the HI16/LO16 generation.
 
-.*:     file format elf.*mips
+.*:     file format .*
 
 RELOCATION RECORDS FOR \[\.text\]:
 OFFSET [ ]+ TYPE              VALUE 
index 354a578eb667e1d42fa6f0a57aa01dd1d77fabde..5f90a0d68666456398417193eae5d1895ee0b784 100644 (file)
@@ -7,7 +7,7 @@
 # FIXME: really this should check that the contents of .sdata, .lit4,
 # and .lit8 are correct too.
 
-.*:     file format elf.*mips
+.*:     file format .*
 
 RELOCATION RECORDS FOR \[\.text\]:
 OFFSET [ ]+ TYPE              VALUE 
index 4c4d67930e50525da4ba01031965934551c832d2..d6cda0ac7ce2ff51cc40f24f444b19808064bc11 100644 (file)
@@ -3,7 +3,7 @@
 #source: elf-rel3.s
 #as: -32
 
-.*:     file format elf.*mips
+.*:     file format .*
 
 RELOCATION RECORDS FOR \[\.data\]:
 OFFSET [ ]+ TYPE              VALUE 
index 305781fa7a0872e98834a803492ddfedc29b262d..88f73c0a543d6981febc0ede4974fd7bea982b96 100644 (file)
@@ -3,7 +3,7 @@
 #name: MIPS ld-st-la constants (ABI o32, mips3, shared)
 #source: ldstla-32-mips3.s
 
-.*: +file format elf32-.*mips
+.*: +file format .*
 
 Disassembly of section \.text:
 
index 2d9b00baa6dec580fbfc19e31357e47a36f5ec85..b9df3b89e6ef33f82c2c7b46352cfd5e812d3aee 100644 (file)
@@ -3,7 +3,7 @@
 #name: MIPS ld-st-la constants (ABI o32, mips3)
 #source: ldstla-32-mips3.s
 
-.*: +file format elf32-.*mips
+.*: +file format .*
 
 Disassembly of section \.text:
 
index d4787f9525d29556bfe57524d4351ba8fe8a1996..45f4772e5fdbb9a845c9fdce548287e1e156e712 100644 (file)
@@ -3,7 +3,7 @@
 #name: MIPS ld-st-la constants (ABI o32, shared)
 #source: ldstla-32.s
 
-.*: +file format elf32-.*mips
+.*: +file format .*
 
 Disassembly of section \.text:
 
index 985246cc0ff02c276cb2c131c9102d1f32650107..42ed4813e898da8b0d4983c9cd549a206c1c624b 100644 (file)
@@ -3,7 +3,7 @@
 #name: MIPS ld-st-la constants (ABI o32)
 #source: ldstla-32.s
 
-.*: +file format elf32-.*mips
+.*: +file format .*
 
 Disassembly of section \.text:
 
index acbbb43f46e4515e59b07ea8ac15a6537cf37ae7..ede34a5bc77c7bb8ecf6da0c90743407bbc8038c 100644 (file)
@@ -3,7 +3,7 @@
 #name: MIPS ld-st-la constants (ABI n64, shared)
 #source: ldstla-n64.s
 
-.*: +file format elf64-.*mips
+.*: +file format .*
 
 Disassembly of section \.text:
 
index 4425e9c71f6f070af1341210356ef7ed52873ad3..dd028fce00ac56db6c5ebd0514bdd84bc7788822 100644 (file)
@@ -3,7 +3,7 @@
 #name: MIPS ld-st-la constants (ABI n64)
 #source: ldstla-n64.s
 
-.*: +file format elf64-.*mips
+.*: +file format .*
 
 Disassembly of section \.text:
 
index 560fb303b96c156525cf54ba84c2ab4cfcabab28..b46c959abd536ff151b9f38504c7247f75976c18 100644 (file)
@@ -1,7 +1,7 @@
 #as: -32 -mips1
 #objdump: -dr
 
-.*: +file format .*mips
+.*: +file format .*
 
 Disassembly of section \.text:
 
index 8ef72cc0a47fbee3d7527d8b5a3767c613158eae..a53ab7a412ab16f90d03f548b017973661f6fee2 100644 (file)
@@ -2,7 +2,7 @@
 #name: .set arch=FOO
 #stderr: set-arch.l
 
-dump\.o:     file format .*mips
+dump\.o:     file format .*
 
 Disassembly of section \.text:
 00000000 <[^>]*> bc010000      cache   0x1,0\(zero\)
index feb58ae610d4bb00c89bd4ec55a5cadc2539604a..d81ba4ee78cfa74bdcf4f6fae6e4c4c319e6a1e8 100644 (file)
@@ -2,7 +2,7 @@
 #objdump: -dr
 #name: MIPS ELF TLS o32
 
-dump.o:     file format elf32-.*bigmips
+dump.o:     file format .*
 
 Disassembly of section .text:
 
index 8bac5f03c76cf12aec6548df7b4517620b636d76..fa623ef3998d30e1721f1257ce9938b5614663f7 100644 (file)
@@ -1,3 +1,20 @@
+2010-12-31  Robert Millan  <rmh@gnu.org>
+
+       * configure.tgt: Recognize mips-freebsd and mips-kfreebsd-gnu.
+
+       * emulparams/elf32btsmip_fbsd.sh: New file.
+       * emulparams/elf32btsmipn32_fbsd.sh: Likewise.
+       * emulparams/elf32ltsmip_fbsd.sh: Likewise.
+       * emulparams/elf32ltsmipn32_fbsd.sh: Likewise.
+       * emulparams/elf64btsmip_fbsd.sh: Likewise.
+       * emulparams/elf64ltsmip_fbsd.sh: Likewise.
+
+       * Makefile.am: Add build rules for `eelf32btsmip_fbsd.c',
+       `eelf32btsmipn32_fbsd.c', `eelf32ltsmip_fbsd.c',
+       `eelf32ltsmipn32_fbsd.c', `eelf64btsmip_fbsd.c' and
+       `eelf64ltsmip_fbsd.c'.
+       * Makefile.in: Regenerate.
+
 2010-12-30  H.J. Lu  <hongjiu.lu@intel.com>
 
        * emulparams/elf32_x86_64.sh: New.
index aa6d7c5e1e1496a87141ffe8b897d6bdbd80a847..bd368cac64faba7ec376f28ae14a3df14ace5e3d 100644 (file)
@@ -189,10 +189,14 @@ ALL_EMULATION_SOURCES = \
        eelf32bmip.c \
        eelf32bmipn32.c \
        eelf32btsmip.c \
+       eelf32btsmip_fbsd.c \
        eelf32crx.c \
        eelf32btsmipn32.c \
+       eelf32btsmipn32_fbsd.c \
        eelf32ltsmip.c \
+       eelf32ltsmip_fbsd.c \
        eelf32ltsmipn32.c \
+       eelf32ltsmipn32_fbsd.c \
        eelf32ebmip.c \
        eelf32ebmipvxworks.c \
        eelf32elmip.c \
@@ -456,7 +460,9 @@ ALL_64_EMULATION_SOURCES = \
        eelf64alpha_nbsd.c \
        eelf64bmip.c \
        eelf64btsmip.c \
+       eelf64btsmip_fbsd.c \
        eelf64ltsmip.c \
+       eelf64ltsmip_fbsd.c \
        eelf64hppa.c \
        eelf64mmix.c \
        emmo.c \
@@ -932,6 +938,10 @@ eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
   $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
+eelf32btsmip_fbsd.c: $(srcdir)/emulparams/elf32btsmip_fbsd.sh \
+  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32btsmip_fbsd "$(tdir_elf32btsmip_fbsd)"
 eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/crxelf.em \
   $(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
@@ -940,16 +950,30 @@ eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32btsmipn32 "$(tdir_elf32btsmipn32)"
+eelf32btsmipn32_fbsd.c: $(srcdir)/emulparams/elf32btsmipn32_fbsd.sh \
+  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32btsmipn32_fbsd "$(tdir_elf32btsmipn32_fbsd)"
 eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
   $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
   ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
+eelf32ltsmip_fbsd.c: $(srcdir)/emulparams/elf32ltsmip_fbsd.sh \
+  $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
+  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+  ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32ltsmip_fbsd "$(tdir_elf32ltsmip_fbsd)"
 eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
   $(srcdir)/emulparams/elf32btsmipn32.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
+eelf32ltsmipn32_fbsd.c: $(srcdir)/emulparams/elf32ltsmipn32_fbsd.sh \
+  $(srcdir)/emulparams/elf32btsmipn32.sh \
+  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32ltsmipn32_fbsd "$(tdir_elf32ltsmipn32_fbsd)"
 eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
   $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -1157,11 +1181,21 @@ eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
+eelf64btsmip_fbsd.c: $(srcdir)/emulparams/elf64btsmip_fbsd.sh \
+  $(srcdir)/emulparams/elf64bmip-defs.sh \
+  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf64btsmip_fbsd "$(tdir_elf64btsmip_fbsd)"
 eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
   $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
+eelf64ltsmip_fbsd.c: $(srcdir)/emulparams/elf64ltsmip_fbsd.sh \
+  $(srcdir)/emulparams/elf64btsmip_fbsd.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
+  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf64ltsmip_fbsd "$(tdir_elf64ltsmip_fbsd)"
 eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
index dd5bd2d69e0650fe32820caec94e375a0a15e59b..9227ca16dd31bf04a236179927ff8b45c6ed893f 100644 (file)
@@ -490,10 +490,14 @@ ALL_EMULATION_SOURCES = \
        eelf32bmip.c \
        eelf32bmipn32.c \
        eelf32btsmip.c \
+       eelf32btsmip_fbsd.c \
        eelf32crx.c \
        eelf32btsmipn32.c \
+       eelf32btsmipn32_fbsd.c \
        eelf32ltsmip.c \
+       eelf32ltsmip_fbsd.c \
        eelf32ltsmipn32.c \
+       eelf32ltsmipn32_fbsd.c \
        eelf32ebmip.c \
        eelf32ebmipvxworks.c \
        eelf32elmip.c \
@@ -756,7 +760,9 @@ ALL_64_EMULATION_SOURCES = \
        eelf64alpha_nbsd.c \
        eelf64bmip.c \
        eelf64btsmip.c \
+       eelf64btsmip_fbsd.c \
        eelf64ltsmip.c \
+       eelf64ltsmip_fbsd.c \
        eelf64hppa.c \
        eelf64mmix.c \
        emmo.c \
@@ -1065,7 +1071,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32bmip.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32bmipn32.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32btsmip.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32btsmip_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32btsmipn32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32btsmipn32_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32cr16.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32cr16c.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32crx.Po@am__quote@
@@ -1088,7 +1096,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppcnto.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppcsim.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ltsmip.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ltsmip_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ltsmipn32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ltsmipn32_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32m32c.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mb_linux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mcore.Po@am__quote@
@@ -1124,9 +1134,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64alpha_nbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64bmip.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ltsmip.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ltsmip_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64mmix.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ppc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Po@am__quote@
@@ -2357,6 +2369,10 @@ eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
   $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
+eelf32btsmip_fbsd.c: $(srcdir)/emulparams/elf32btsmip_fbsd.sh \
+  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32btsmip_fbsd "$(tdir_elf32btsmip_fbsd)"
 eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/crxelf.em \
   $(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
@@ -2365,16 +2381,30 @@ eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32btsmipn32 "$(tdir_elf32btsmipn32)"
+eelf32btsmipn32_fbsd.c: $(srcdir)/emulparams/elf32btsmipn32_fbsd.sh \
+  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32btsmipn32_fbsd "$(tdir_elf32btsmipn32_fbsd)"
 eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
   $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
   ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
+eelf32ltsmip_fbsd.c: $(srcdir)/emulparams/elf32ltsmip_fbsd.sh \
+  $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
+  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+  ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32ltsmip_fbsd "$(tdir_elf32ltsmip_fbsd)"
 eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
   $(srcdir)/emulparams/elf32btsmipn32.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
+eelf32ltsmipn32_fbsd.c: $(srcdir)/emulparams/elf32ltsmipn32_fbsd.sh \
+  $(srcdir)/emulparams/elf32btsmipn32.sh \
+  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32ltsmipn32_fbsd "$(tdir_elf32ltsmipn32_fbsd)"
 eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
   $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -2582,11 +2612,21 @@ eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
+eelf64btsmip_fbsd.c: $(srcdir)/emulparams/elf64btsmip_fbsd.sh \
+  $(srcdir)/emulparams/elf64bmip-defs.sh \
+  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf64btsmip_fbsd "$(tdir_elf64btsmip_fbsd)"
 eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
   $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
   $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
+eelf64ltsmip_fbsd.c: $(srcdir)/emulparams/elf64ltsmip_fbsd.sh \
+  $(srcdir)/emulparams/elf64btsmip_fbsd.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
+  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf64ltsmip_fbsd "$(tdir_elf64ltsmip_fbsd)"
 eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
index 44fae09b6f74019cd12f139ec195ab2909dd5117..4025837df8772f75c0bb4b012e317f5b7f81c6cf 100644 (file)
@@ -413,6 +413,22 @@ mips*el-*-linux-*) targ_emul=elf32ltsmip
 mips*-*-linux-*)       targ_emul=elf32btsmip
                        targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
                        targ_extra_libpath=$targ_extra_emuls ;;
+mips64*el-*-freebsd-* | mips64*el-*-kfreebsd*-gnu)
+                       targ_emul=elf32ltsmipn32_fbsd
+                       targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
+                       targ_extra_libpath=$targ_extra_emuls ;;
+mips64*-*-freebsd-* | mips64*-*-kfreebsd*-gnu)
+                       targ_emul=elf32btsmipn32_fbsd
+                       targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
+                       targ_extra_libpath=$targ_extra_emuls ;;
+mips*el-*-freebsd-* | mips*el-*-kfreebsd*-gnu)
+                       targ_emul=elf32ltsmip_fbsd
+                       targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmipn32_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
+                       targ_extra_libpath=$targ_extra_emuls ;;
+mips*-*-freebsd-* | mips*-*-kfreebsd*-gnu)
+                       targ_emul=elf32btsmip_fbsd
+                       targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
+                       targ_extra_libpath=$targ_extra_emuls ;;
 mips*-*-lnews*)                targ_emul=mipslnews ;;
 mips*-*-sysv4*)         targ_emul=elf32btsmip
                        ;;
diff --git a/ld/emulparams/elf32btsmip_fbsd.sh b/ld/emulparams/elf32btsmip_fbsd.sh
new file mode 100644 (file)
index 0000000..e2a9011
--- /dev/null
@@ -0,0 +1,5 @@
+. ${srcdir}/emulparams/elf32btsmip.sh
+. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf32-tradbigmips-freebsd"
+BIG_OUTPUT_FORMAT="elf32-tradbigmips-freebsd"
+LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips-freebsd"
diff --git a/ld/emulparams/elf32btsmipn32_fbsd.sh b/ld/emulparams/elf32btsmipn32_fbsd.sh
new file mode 100644 (file)
index 0000000..83e2e44
--- /dev/null
@@ -0,0 +1,5 @@
+. ${srcdir}/emulparams/elf32ltsmipn32.sh
+. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf32-ntradbigmips-freebsd"
+BIG_OUTPUT_FORMAT="elf32-ntradbigmips-freebsd"
+LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips-freebsd"
diff --git a/ld/emulparams/elf32ltsmip_fbsd.sh b/ld/emulparams/elf32ltsmip_fbsd.sh
new file mode 100644 (file)
index 0000000..98cb987
--- /dev/null
@@ -0,0 +1,5 @@
+. ${srcdir}/emulparams/elf32ltsmip.sh
+. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf32-tradlittlemips-freebsd"
+BIG_OUTPUT_FORMAT="elf32-tradbigmips-freebsd"
+LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips-freebsd"
diff --git a/ld/emulparams/elf32ltsmipn32_fbsd.sh b/ld/emulparams/elf32ltsmipn32_fbsd.sh
new file mode 100644 (file)
index 0000000..1d39f69
--- /dev/null
@@ -0,0 +1,5 @@
+. ${srcdir}/emulparams/elf32ltsmipn32.sh
+. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf32-ntradlittlemips-freebsd"
+BIG_OUTPUT_FORMAT="elf32-ntradbigmips-freebsd"
+LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips-freebsd"
diff --git a/ld/emulparams/elf64btsmip_fbsd.sh b/ld/emulparams/elf64btsmip_fbsd.sh
new file mode 100644 (file)
index 0000000..32889b4
--- /dev/null
@@ -0,0 +1,5 @@
+. ${srcdir}/emulparams/elf64btsmip.sh
+. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf64-tradbigmips-freebsd"
+BIG_OUTPUT_FORMAT="elf64-tradbigmips-freebsd"
+LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips-freebsd"
diff --git a/ld/emulparams/elf64ltsmip_fbsd.sh b/ld/emulparams/elf64ltsmip_fbsd.sh
new file mode 100644 (file)
index 0000000..0cd0616
--- /dev/null
@@ -0,0 +1,5 @@
+. ${srcdir}/emulparams/elf64ltsmip.sh
+. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf64-tradlittlemips-freebsd"
+BIG_OUTPUT_FORMAT="elf64-tradbigmips-freebsd"
+LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips-freebsd"
index 33e6c918eef1058499d53d0039ba430c1523b439..681c326b4be26f5d6a5effb408fa17e915cc4903 100644 (file)
@@ -1,3 +1,10 @@
+2010-12-31  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * ld-mips-elf/mips-elf-flags.exp: Handle FreeBSD targets.
+       * ld-mips-elf/mips-elf.exp: Likewise.
+       * ld-mips-elf/mips16-call-global.d: Accept any file format.
+       * ld-mips-elf/mips16-intermix.d: Likewise.
+
 2010-12-28  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/12327
index 512cf5135333713626087937491bb29adfbfdfea..a7e4453119932a5909332b00647a796acd7ee4b3 100644 (file)
@@ -28,6 +28,10 @@ if {[istarget mips*-*-irix6*]} {
     set ldemul "-melf32ltsmip"
 } elseif {[istarget mips*-*-linux*]} {
     set ldemul "-melf32btsmip"
+} elseif {[istarget mips*el-*-*freebsd*]} {
+    set ldemul "-melf32ltsmip_fbsd"
+} elseif {[istarget mips*-*-*freebsd*]} {
+    set ldemul "-melf32btsmip_fbsd"
 } else {
     set ldemul ""
 }
index 6c283e206b19e80368f7dcee1f461d840eb8bc3d..71c8bcc177a06db1621affe278836fedd12d8229 100644 (file)
@@ -109,6 +109,9 @@ if { $linux_gnu } {
 if { [istarget mips64*-linux-gnu] } {
     set o32_as_flags "-32 -EB"
     set o32_ld_flags "-melf32btsmip"
+} elseif { [istarget mips64*-*freebsd*] } {
+    set o32_as_flags "-32 -EB"
+    set o32_ld_flags "-melf32btsmip_fbsd"
 } else {
     set o32_as_flags ""
     set o32_ld_flags ""
index 051ebcdae8b24d72bf9844a21580b878960d1e6d..390d84cf1d763ec62d18359c1ef054227f76599f 100644 (file)
@@ -1,5 +1,5 @@
 
-.*:     file format elf.*mips
+.*:     file format .*
 
 Disassembly of section .text:
 
index cc8c1fe5b4a10479514d7a964bb9eef8a4d704f4..10c727063249800f46ff0c24317ef948932f11af 100644 (file)
@@ -1,5 +1,5 @@
 
-.*: +file format elf.*mips
+.*: +file format .*
 
 SYMBOL TABLE:
 #...