From 0749c73cf8d5308359a75823b887c8cdf2e1b993 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 15 Jun 2023 11:45:03 +0930 Subject: [PATCH] Re: Add some expected failures for bfin linker tests 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 --- ld/testsuite/ld-elf/comm-data5.d | 2 +- ld/testsuite/ld-elf/pr23591.d | 2 +- ld/testsuite/ld-elf/pr23648.d | 2 +- ld/testsuite/ld-elf/sec64k.exp | 3 ++- ld/testsuite/ld-gc/pr19167.d | 2 +- ld/testsuite/ld-gc/start.d | 2 +- ld/testsuite/ld-gc/start2.d | 2 +- ld/testsuite/ld-gc/start3.d | 2 +- ld/testsuite/ld-gc/start4.d | 2 +- ld/testsuite/ld-misc/defsym1.d | 2 +- ld/testsuite/ld-scripts/empty-address-1.d | 2 +- ld/testsuite/ld-scripts/empty-address-2a.d | 2 +- ld/testsuite/ld-scripts/empty-address-2b.d | 2 +- ld/testsuite/ld-scripts/pr14962-2.d | 2 +- ld/testsuite/ld-scripts/pr14962.d | 4 ++-- ld/testsuite/ld-scripts/weak.exp | 3 ++- 16 files changed, 19 insertions(+), 17 deletions(-) diff --git a/ld/testsuite/ld-elf/comm-data5.d b/ld/testsuite/ld-elf/comm-data5.d index d13535150a2..3e8c9b09a0e 100644 --- a/ld/testsuite/ld-elf/comm-data5.d +++ b/ld/testsuite/ld-elf/comm-data5.d @@ -1,6 +1,6 @@ #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. diff --git a/ld/testsuite/ld-elf/pr23591.d b/ld/testsuite/ld-elf/pr23591.d index 925453873e1..a97935eb3c3 100644 --- a/ld/testsuite/ld-elf/pr23591.d +++ b/ld/testsuite/ld-elf/pr23591.d @@ -3,7 +3,7 @@ #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. diff --git a/ld/testsuite/ld-elf/pr23648.d b/ld/testsuite/ld-elf/pr23648.d index 4b9b9be76e6..848ebd91c90 100644 --- a/ld/testsuite/ld-elf/pr23648.d +++ b/ld/testsuite/ld-elf/pr23648.d @@ -1,6 +1,6 @@ #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 diff --git a/ld/testsuite/ld-elf/sec64k.exp b/ld/testsuite/ld-elf/sec64k.exp index f04b0829b17..28ebe1d3e81 100644 --- a/ld/testsuite/ld-elf/sec64k.exp +++ b/ld/testsuite/ld-elf/sec64k.exp @@ -170,12 +170,13 @@ if [catch { set ofd [open "tmpdir/$test2.d" w] } x] { # 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" } diff --git a/ld/testsuite/ld-gc/pr19167.d b/ld/testsuite/ld-gc/pr19167.d index f652dd018f4..f3024169134 100644 --- a/ld/testsuite/ld-gc/pr19167.d +++ b/ld/testsuite/ld-gc/pr19167.d @@ -2,7 +2,7 @@ #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: diff --git a/ld/testsuite/ld-gc/start.d b/ld/testsuite/ld-gc/start.d index 0998ecfcc68..1f7ece590c8 100644 --- a/ld/testsuite/ld-gc/start.d +++ b/ld/testsuite/ld-gc/start.d @@ -1,7 +1,7 @@ #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 diff --git a/ld/testsuite/ld-gc/start2.d b/ld/testsuite/ld-gc/start2.d index b893ba23729..d5a3e396b75 100644 --- a/ld/testsuite/ld-gc/start2.d +++ b/ld/testsuite/ld-gc/start2.d @@ -2,7 +2,7 @@ #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 #... diff --git a/ld/testsuite/ld-gc/start3.d b/ld/testsuite/ld-gc/start3.d index a57dab187ea..d3d0a5fc1e8 100644 --- a/ld/testsuite/ld-gc/start3.d +++ b/ld/testsuite/ld-gc/start3.d @@ -2,7 +2,7 @@ #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 diff --git a/ld/testsuite/ld-gc/start4.d b/ld/testsuite/ld-gc/start4.d index ae77aa9bf73..60439a1262c 100644 --- a/ld/testsuite/ld-gc/start4.d +++ b/ld/testsuite/ld-gc/start4.d @@ -2,7 +2,7 @@ #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 diff --git a/ld/testsuite/ld-misc/defsym1.d b/ld/testsuite/ld-misc/defsym1.d index 95868c45ac5..fe5b94754f1 100644 --- a/ld/testsuite/ld-misc/defsym1.d +++ b/ld/testsuite/ld-misc/defsym1.d @@ -1,7 +1,7 @@ #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 diff --git a/ld/testsuite/ld-scripts/empty-address-1.d b/ld/testsuite/ld-scripts/empty-address-1.d index a2940b3d2c9..dbaf778024e 100644 --- a/ld/testsuite/ld-scripts/empty-address-1.d +++ b/ld/testsuite/ld-scripts/empty-address-1.d @@ -1,6 +1,6 @@ #ld: -T empty-address-1.t #nm: -n -#xfail: bfin-*-*linux* frv-*-*linux* +#xfail: bfin-*-linux* frv-*-*linux* #... 0+0 [AT] _start #... diff --git a/ld/testsuite/ld-scripts/empty-address-2a.d b/ld/testsuite/ld-scripts/empty-address-2a.d index ea6048d5cd8..4471a1be6a3 100644 --- a/ld/testsuite/ld-scripts/empty-address-2a.d +++ b/ld/testsuite/ld-scripts/empty-address-2a.d @@ -1,7 +1,7 @@ #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 #... diff --git a/ld/testsuite/ld-scripts/empty-address-2b.d b/ld/testsuite/ld-scripts/empty-address-2b.d index 95499405940..8dfe888b63d 100644 --- a/ld/testsuite/ld-scripts/empty-address-2b.d +++ b/ld/testsuite/ld-scripts/empty-address-2b.d @@ -1,7 +1,7 @@ #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 #... diff --git a/ld/testsuite/ld-scripts/pr14962-2.d b/ld/testsuite/ld-scripts/pr14962-2.d index 8df00d9d1f4..8b464da652c 100644 --- a/ld/testsuite/ld-scripts/pr14962-2.d +++ b/ld/testsuite/ld-scripts/pr14962-2.d @@ -1,7 +1,7 @@ #ld: -T pr14962-2.t #source: pr14962a.s #nm: -n -#xfail: bfin-*-*linux* frv-*-*linux* +#xfail: bfin-*-linux* frv-*-*linux* #... 0+2000 [AT] _start diff --git a/ld/testsuite/ld-scripts/pr14962.d b/ld/testsuite/ld-scripts/pr14962.d index 779b3c92677..4c8e3707f7e 100644 --- a/ld/testsuite/ld-scripts/pr14962.d +++ b/ld/testsuite/ld-scripts/pr14962.d @@ -5,8 +5,8 @@ #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 diff --git a/ld/testsuite/ld-scripts/weak.exp b/ld/testsuite/ld-scripts/weak.exp index dff087d3a2a..004ea593e64 100644 --- a/ld/testsuite/ld-scripts/weak.exp +++ b/ld/testsuite/ld-scripts/weak.exp @@ -26,7 +26,8 @@ set testname "weak symbols" 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-*-*] -- 2.30.2