After commit
7ade0f1582c4 I was seeing bfin-elf +XPASS: weak symbols,
and on looking into the bfin targets a little, discovered we have two
bfin-linux targets. One, bfin-uclinux, is like bfin-elf in that
ld -m elf32bfin is the default, and the other, bfin-linux-uclibc where
ld -m elf32bfinfd is the default. So putting bfin-*-*linux* in test
xfails or elsewhere is wrong. We want bfin-*-linux* instead to just
select the fdpic bfin target.
This patch corrects wrong bfin target triples in the ld testsuite,
not just the recent change but others I'd added to xfails too.
It also fixes the bfin-linux-uclibc ld-elf/64ksec fail
#source: comm-data5.s
#ld:
#readelf: -r
-#xfail: bfin-*-*linux* frv-*-*linux* lm32-*-linux*
+#xfail: bfin-*-linux* frv-*-*linux* lm32-*-linux*
There are no relocations in this file.
#source: pr23591c.s
#ld: -e _start
#readelf: -sW
-#xfail: bfin-*-*linux* frv-*-linux* lm32-*-linux*
+#xfail: bfin-*-linux* frv-*-linux* lm32-*-linux*
# bfin, frv, and lm32 fail with complaints about emitting dynamic
# relocations in read-only sections.
#ld: --gc-sections -T pr23648.t
#target: [check_gc_sections_available]
-#xfail: bfin-*-*linux* frv-*-linux* lm32-*-linux*
+#xfail: bfin-*-linux* frv-*-linux* lm32-*-linux*
#nm: -B
#failif
# too big for avr, d10v and msp
# lack of fancy orphan section handling causes overlap on fr30 and iq2000
-# lm32 complains about relocations in read-only sections
+# bfin and lm32 complain about relocations in read-only sections
if { ![istarget "d10v-*-*"]
&& ![istarget "avr-*-*"]
&& ![istarget "msp*-*-*"]
&& ![istarget "fr30-*-*"]
&& ![istarget "iq2000-*-*"]
+ && ![istarget "bfin-*-linux*"]
&& ![istarget "lm32-*-linux*"]
&& ![istarget "pru-*-*"] } {
foreach sfile $sfiles { puts $ofd "#source: $sfile" }
#source: pr19167b.s
#ld: --gc-sections -e _start
#objdump: -s -j _foo
-#xfail: bfin-*-*linux* frv-*-*linux* lm32-*-*linux*
+#xfail: bfin-*-linux* frv-*-*linux* lm32-*-*linux*
#...
Contents of section _foo:
#name: --gc-sections with __start_
#ld: --gc-sections -e _start
#nm: -n
-#xfail: bfin-*-*linux* frv-*-*linux* lm32-*-*linux*
+#xfail: bfin-*-linux* frv-*-*linux* lm32-*-*linux*
#...
[0-9a-f]+ D +_?__start__foo
#ld: --gc-sections -e _start -z start-stop-gc
#nm: -n
#notarget: [uses_genelf]
-#xfail: bfin-*-*linux* frv-*-*linux*
+#xfail: bfin-*-linux* frv-*-*linux*
#failif
#...
#ld: --gc-sections -e _start
#nm: -n
#notarget: [is_generic]
-#xfail: bfin-*-*linux* frv-*-*linux* lm32-*-*linux*
+#xfail: bfin-*-linux* frv-*-*linux* lm32-*-*linux*
#...
[0-9a-f]+ T +bar
#ld: --gc-sections -e _start
#nm: -n
#target: [supports_gnu_unique]
-#xfail: bfin-*-*linux* frv-*-*linux* lm32-*-*linux*
+#xfail: bfin-*-linux* frv-*-*linux* lm32-*-*linux*
#...
[0-9a-f]+ R +bar_xx
#ld: -e 0 --defsym foo=1 tmpdir/start.o tmpdir/libfoo.a
#nm: -B
#source: dummy.s
-#xfail: bfin-*-*linux* frv-*-linux*
+#xfail: bfin-*-linux* frv-*-linux*
# Check that --defsym works on archive.
#failif
#ld: -T empty-address-1.t
#nm: -n
-#xfail: bfin-*-*linux* frv-*-*linux*
+#xfail: bfin-*-linux* frv-*-*linux*
#...
0+0 [AT] _start
#...
#source: empty-address-2.s
#ld: -Ttext 0x0000000 -Tdata 0x200 -T empty-address-2a.t
#nm: -n
-#xfail: bfin-*-*linux* frv-*-*linux* riscv64*-*-* tic54x-*-*
+#xfail: bfin-*-linux* frv-*-*linux* riscv64*-*-* tic54x-*-*
#...
0+0 T _start
#...
#source: empty-address-2.s
#ld: -Ttext 0x0000000 -Tdata 0x200 -T empty-address-2b.t
#nm: -n
-#xfail: bfin-*-*linux* frv-*-*linux* riscv64*-*-* tic54x-*-*
+#xfail: bfin-*-linux* frv-*-*linux* riscv64*-*-* tic54x-*-*
#...
0+0 T _start
#...
#ld: -T pr14962-2.t
#source: pr14962a.s
#nm: -n
-#xfail: bfin-*-*linux* frv-*-*linux*
+#xfail: bfin-*-linux* frv-*-*linux*
#...
0+2000 [AT] _start
#xfail: mmix-knuth-mmixware
# The reference to x would normally generate a cross-reference error
# but the linker script converts x to absolute to avoid the error.
-#xfail: bfin-*-*linux*
-# The bfin backend complains about attempting to put a fixup into a read-only section.
+#xfail: bfin-*-linux*
+# The bfinfd backend complains about fixups in read-only sections.
#...
0+2000 A x
if { [is_elf_format] } {
# hppa64 is incredibly broken
setup_xfail hppa64-*-*
- setup_xfail bfin-*-*
+ # elf32bfinfd target complains about fixups in read-only sections
+ setup_xfail bfin-*-linux*
} elseif { [is_pecoff_format] } {
# Weak symbols are broken for most PE targets.
if { ![istarget aarch64-*-*]