This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH #1] mips*-kfreebsd-gnu support in BFD
Robert Millan <rmh@gnu.org> writes:
> Here's a new patch. Sorry for the oversight (it's
> difficult to keep track of so many vector names).
Thanks, the new patch looks good. A similar change was needed in
ld/configure.tgt, so I added:
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 ;;
All three patches applied with that change. I also applied the patch
below to get the testsuite into reasonable shape.
Please check that the committed version works on a real system.
Richard
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.
Index: binutils/testsuite/binutils-all/readelf.exp
===================================================================
--- binutils/testsuite/binutils-all/readelf.exp 2010-12-31 10:52:04.000000000 +0000
+++ binutils/testsuite/binutils-all/readelf.exp 2010-12-31 10:52:18.000000000 +0000
@@ -101,7 +101,9 @@ proc readelf_test { options binary_file
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: gas/testsuite/gas/mips/e32el-rel2.d
===================================================================
--- gas/testsuite/gas/mips/e32el-rel2.d 2010-12-31 10:42:49.000000000 +0000
+++ gas/testsuite/gas/mips/e32el-rel2.d 2010-12-31 10:42:58.000000000 +0000
@@ -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: gas/testsuite/gas/mips/elf-rel.d
===================================================================
--- gas/testsuite/gas/mips/elf-rel.d 2010-12-31 10:43:47.000000000 +0000
+++ gas/testsuite/gas/mips/elf-rel.d 2010-12-31 10:44:04.000000000 +0000
@@ -4,7 +4,7 @@
# Test the HI16/LO16 generation.
-.*: file format elf.*mips
+.*: file format .*
RELOCATION RECORDS FOR \[\.text\]:
OFFSET [ ]+ TYPE VALUE
Index: gas/testsuite/gas/mips/elf-rel2.d
===================================================================
--- gas/testsuite/gas/mips/elf-rel2.d 2010-12-31 10:43:46.000000000 +0000
+++ gas/testsuite/gas/mips/elf-rel2.d 2010-12-31 10:43:52.000000000 +0000
@@ -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: gas/testsuite/gas/mips/elf-rel3.d
===================================================================
--- gas/testsuite/gas/mips/elf-rel3.d 2010-12-31 10:43:46.000000000 +0000
+++ gas/testsuite/gas/mips/elf-rel3.d 2010-12-31 10:43:56.000000000 +0000
@@ -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: gas/testsuite/gas/mips/elfel-rel.d
===================================================================
--- gas/testsuite/gas/mips/elfel-rel.d 2010-12-31 10:43:28.000000000 +0000
+++ gas/testsuite/gas/mips/elfel-rel.d 2010-12-31 10:43:39.000000000 +0000
@@ -5,7 +5,7 @@
# Test the HI16/LO16 generation.
-.*: file format elf.*mips
+.*: file format .*
RELOCATION RECORDS FOR \[\.text\]:
OFFSET [ ]+ TYPE VALUE
Index: gas/testsuite/gas/mips/elfel-rel2.d
===================================================================
--- gas/testsuite/gas/mips/elfel-rel2.d 2010-12-31 10:43:28.000000000 +0000
+++ gas/testsuite/gas/mips/elfel-rel2.d 2010-12-31 10:43:32.000000000 +0000
@@ -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: gas/testsuite/gas/mips/elfel-rel3.d
===================================================================
--- gas/testsuite/gas/mips/elfel-rel3.d 2010-12-31 10:43:28.000000000 +0000
+++ gas/testsuite/gas/mips/elfel-rel3.d 2010-12-31 10:43:36.000000000 +0000
@@ -3,7 +3,7 @@
#source: elf-rel3.s
#as: -32
-.*: file format elf.*mips
+.*: file format .*
RELOCATION RECORDS FOR \[\.data\]:
OFFSET [ ]+ TYPE VALUE
Index: gas/testsuite/gas/mips/ldstla-32-mips3-shared.d
===================================================================
--- gas/testsuite/gas/mips/ldstla-32-mips3-shared.d 2010-12-31 10:41:14.000000000 +0000
+++ gas/testsuite/gas/mips/ldstla-32-mips3-shared.d 2010-12-31 10:41:31.000000000 +0000
@@ -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: gas/testsuite/gas/mips/ldstla-32-mips3.d
===================================================================
--- gas/testsuite/gas/mips/ldstla-32-mips3.d 2010-12-31 10:41:14.000000000 +0000
+++ gas/testsuite/gas/mips/ldstla-32-mips3.d 2010-12-31 10:41:26.000000000 +0000
@@ -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: gas/testsuite/gas/mips/ldstla-32-shared.d
===================================================================
--- gas/testsuite/gas/mips/ldstla-32-shared.d 2010-12-31 10:41:14.000000000 +0000
+++ gas/testsuite/gas/mips/ldstla-32-shared.d 2010-12-31 10:41:37.000000000 +0000
@@ -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: gas/testsuite/gas/mips/ldstla-32.d
===================================================================
--- gas/testsuite/gas/mips/ldstla-32.d 2010-12-31 10:41:14.000000000 +0000
+++ gas/testsuite/gas/mips/ldstla-32.d 2010-12-31 10:41:21.000000000 +0000
@@ -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: gas/testsuite/gas/mips/ldstla-n64-shared.d
===================================================================
--- gas/testsuite/gas/mips/ldstla-n64-shared.d 2010-12-31 10:41:15.000000000 +0000
+++ gas/testsuite/gas/mips/ldstla-n64-shared.d 2010-12-31 10:41:49.000000000 +0000
@@ -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: gas/testsuite/gas/mips/ldstla-n64.d
===================================================================
--- gas/testsuite/gas/mips/ldstla-n64.d 2010-12-31 10:41:15.000000000 +0000
+++ gas/testsuite/gas/mips/ldstla-n64.d 2010-12-31 10:41:43.000000000 +0000
@@ -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: gas/testsuite/gas/mips/noat-1.d
===================================================================
--- gas/testsuite/gas/mips/noat-1.d 2010-12-31 10:44:11.000000000 +0000
+++ gas/testsuite/gas/mips/noat-1.d 2010-12-31 10:44:16.000000000 +0000
@@ -1,7 +1,7 @@
#as: -32 -mips1
#objdump: -dr
-.*: +file format .*mips
+.*: +file format .*
Disassembly of section \.text:
Index: gas/testsuite/gas/mips/set-arch.d
===================================================================
--- gas/testsuite/gas/mips/set-arch.d 2010-12-31 10:42:03.000000000 +0000
+++ gas/testsuite/gas/mips/set-arch.d 2010-12-31 10:42:07.000000000 +0000
@@ -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: gas/testsuite/gas/mips/tls-o32.d
===================================================================
--- gas/testsuite/gas/mips/tls-o32.d 2010-12-31 10:42:17.000000000 +0000
+++ gas/testsuite/gas/mips/tls-o32.d 2010-12-31 10:42:23.000000000 +0000
@@ -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: ld/testsuite/ld-mips-elf/mips-elf-flags.exp
===================================================================
--- ld/testsuite/ld-mips-elf/mips-elf-flags.exp 2010-12-31 10:31:43.000000000 +0000
+++ ld/testsuite/ld-mips-elf/mips-elf-flags.exp 2010-12-31 10:35:37.000000000 +0000
@@ -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: ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- ld/testsuite/ld-mips-elf/mips-elf.exp 2010-12-31 10:37:19.000000000 +0000
+++ ld/testsuite/ld-mips-elf/mips-elf.exp 2010-12-31 10:37:44.000000000 +0000
@@ -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: ld/testsuite/ld-mips-elf/mips16-call-global.d
===================================================================
--- ld/testsuite/ld-mips-elf/mips16-call-global.d 2010-12-31 10:38:45.000000000 +0000
+++ ld/testsuite/ld-mips-elf/mips16-call-global.d 2010-12-31 10:39:02.000000000 +0000
@@ -1,5 +1,5 @@
-.*: file format elf.*mips
+.*: file format .*
Disassembly of section .text:
Index: ld/testsuite/ld-mips-elf/mips16-intermix.d
===================================================================
--- ld/testsuite/ld-mips-elf/mips16-intermix.d 2010-12-31 10:38:26.000000000 +0000
+++ ld/testsuite/ld-mips-elf/mips16-intermix.d 2010-12-31 10:39:05.000000000 +0000
@@ -1,5 +1,5 @@
-.*: +file format elf.*mips
+.*: +file format .*
SYMBOL TABLE:
#...