diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2010-12-31 11:01:00 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2010-12-31 11:01:00 +0000 |
commit | aeffff67224eb530539e83ab358a907dee834172 (patch) | |
tree | c6ba5a643bf139250c1b923c3f2d78133e0e42d2 /gas | |
parent | a836572f89a477527b109f19601f2fe2b804fd3d (diff) | |
download | gdb-aeffff67224eb530539e83ab358a907dee834172.zip gdb-aeffff67224eb530539e83ab358a907dee834172.tar.gz gdb-aeffff67224eb530539e83ab358a907dee834172.tar.bz2 |
bfd/
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.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 13 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 41 | ||||
-rwxr-xr-x | gas/configure | 7 | ||||
-rw-r--r-- | gas/configure.in | 7 | ||||
-rw-r--r-- | gas/configure.tgt | 2 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 19 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/e32el-rel2.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elf-rel.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elf-rel2.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elf-rel3.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elfel-rel.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elfel-rel2.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elfel-rel3.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ldstla-32-mips3-shared.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ldstla-32-mips3.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ldstla-32-shared.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ldstla-32.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ldstla-n64-shared.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ldstla-n64.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/noat-1.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/set-arch.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/tls-o32.d | 2 |
22 files changed, 74 insertions, 47 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 2864c79..19d0477 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 20bf431..ee9b276 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -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); diff --git a/gas/configure b/gas/configure index d5431f2..0c0071f 100755 --- a/gas/configure +++ b/gas/configure @@ -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 ;; diff --git a/gas/configure.in b/gas/configure.in index c11d1df..69f5fcb 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -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 ;; diff --git a/gas/configure.tgt b/gas/configure.tgt index c05a64a..8ce9003 100644 --- a/gas/configure.tgt +++ b/gas/configure.tgt @@ -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 ;; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index ee3f7bc..cb83065 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -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. diff --git a/gas/testsuite/gas/mips/e32el-rel2.d b/gas/testsuite/gas/mips/e32el-rel2.d index 4d5e980..abfcc57 100644 --- a/gas/testsuite/gas/mips/e32el-rel2.d +++ b/gas/testsuite/gas/mips/e32el-rel2.d @@ -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 diff --git a/gas/testsuite/gas/mips/elf-rel.d b/gas/testsuite/gas/mips/elf-rel.d index d6cee3c..6208fac 100644 --- a/gas/testsuite/gas/mips/elf-rel.d +++ b/gas/testsuite/gas/mips/elf-rel.d @@ -4,7 +4,7 @@ # Test the HI16/LO16 generation. -.*: file format elf.*mips +.*: file format .* RELOCATION RECORDS FOR \[\.text\]: OFFSET [ ]+ TYPE VALUE diff --git a/gas/testsuite/gas/mips/elf-rel2.d b/gas/testsuite/gas/mips/elf-rel2.d index 4bd9cee..8ca682f 100644 --- a/gas/testsuite/gas/mips/elf-rel2.d +++ b/gas/testsuite/gas/mips/elf-rel2.d @@ -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 diff --git a/gas/testsuite/gas/mips/elf-rel3.d b/gas/testsuite/gas/mips/elf-rel3.d index 51dc0af..bfa9c40 100644 --- a/gas/testsuite/gas/mips/elf-rel3.d +++ b/gas/testsuite/gas/mips/elf-rel3.d @@ -2,7 +2,7 @@ #name: MIPS ELF reloc 3 #as: -32 -.*: file format elf.*mips +.*: file format .* RELOCATION RECORDS FOR \[\.data\]: OFFSET [ ]+ TYPE VALUE diff --git a/gas/testsuite/gas/mips/elfel-rel.d b/gas/testsuite/gas/mips/elfel-rel.d index a597212..bac44ed 100644 --- a/gas/testsuite/gas/mips/elfel-rel.d +++ b/gas/testsuite/gas/mips/elfel-rel.d @@ -5,7 +5,7 @@ # Test the HI16/LO16 generation. -.*: file format elf.*mips +.*: file format .* RELOCATION RECORDS FOR \[\.text\]: OFFSET [ ]+ TYPE VALUE diff --git a/gas/testsuite/gas/mips/elfel-rel2.d b/gas/testsuite/gas/mips/elfel-rel2.d index 354a578..5f90a0d 100644 --- a/gas/testsuite/gas/mips/elfel-rel2.d +++ b/gas/testsuite/gas/mips/elfel-rel2.d @@ -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 diff --git a/gas/testsuite/gas/mips/elfel-rel3.d b/gas/testsuite/gas/mips/elfel-rel3.d index 4c4d679..d6cda0a 100644 --- a/gas/testsuite/gas/mips/elfel-rel3.d +++ b/gas/testsuite/gas/mips/elfel-rel3.d @@ -3,7 +3,7 @@ #source: elf-rel3.s #as: -32 -.*: file format elf.*mips +.*: file format .* RELOCATION RECORDS FOR \[\.data\]: OFFSET [ ]+ TYPE VALUE diff --git a/gas/testsuite/gas/mips/ldstla-32-mips3-shared.d b/gas/testsuite/gas/mips/ldstla-32-mips3-shared.d index 305781f..88f73c0 100644 --- a/gas/testsuite/gas/mips/ldstla-32-mips3-shared.d +++ b/gas/testsuite/gas/mips/ldstla-32-mips3-shared.d @@ -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: diff --git a/gas/testsuite/gas/mips/ldstla-32-mips3.d b/gas/testsuite/gas/mips/ldstla-32-mips3.d index 2d9b00b..b9df3b8 100644 --- a/gas/testsuite/gas/mips/ldstla-32-mips3.d +++ b/gas/testsuite/gas/mips/ldstla-32-mips3.d @@ -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: diff --git a/gas/testsuite/gas/mips/ldstla-32-shared.d b/gas/testsuite/gas/mips/ldstla-32-shared.d index d4787f9..45f4772 100644 --- a/gas/testsuite/gas/mips/ldstla-32-shared.d +++ b/gas/testsuite/gas/mips/ldstla-32-shared.d @@ -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: diff --git a/gas/testsuite/gas/mips/ldstla-32.d b/gas/testsuite/gas/mips/ldstla-32.d index 985246c..42ed481 100644 --- a/gas/testsuite/gas/mips/ldstla-32.d +++ b/gas/testsuite/gas/mips/ldstla-32.d @@ -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: diff --git a/gas/testsuite/gas/mips/ldstla-n64-shared.d b/gas/testsuite/gas/mips/ldstla-n64-shared.d index acbbb43..ede34a5 100644 --- a/gas/testsuite/gas/mips/ldstla-n64-shared.d +++ b/gas/testsuite/gas/mips/ldstla-n64-shared.d @@ -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: diff --git a/gas/testsuite/gas/mips/ldstla-n64.d b/gas/testsuite/gas/mips/ldstla-n64.d index 4425e9c..dd028fc 100644 --- a/gas/testsuite/gas/mips/ldstla-n64.d +++ b/gas/testsuite/gas/mips/ldstla-n64.d @@ -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: diff --git a/gas/testsuite/gas/mips/noat-1.d b/gas/testsuite/gas/mips/noat-1.d index 560fb30..b46c959 100644 --- a/gas/testsuite/gas/mips/noat-1.d +++ b/gas/testsuite/gas/mips/noat-1.d @@ -1,7 +1,7 @@ #as: -32 -mips1 #objdump: -dr -.*: +file format .*mips +.*: +file format .* Disassembly of section \.text: diff --git a/gas/testsuite/gas/mips/set-arch.d b/gas/testsuite/gas/mips/set-arch.d index 8ef72cc..a53ab7a 100644 --- a/gas/testsuite/gas/mips/set-arch.d +++ b/gas/testsuite/gas/mips/set-arch.d @@ -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\) diff --git a/gas/testsuite/gas/mips/tls-o32.d b/gas/testsuite/gas/mips/tls-o32.d index feb58ae..d81ba4e 100644 --- a/gas/testsuite/gas/mips/tls-o32.d +++ b/gas/testsuite/gas/mips/tls-o32.d @@ -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: |