diff options
author | YunQiang Su <yunqiang.su@cipunited.com> | 2023-05-16 09:46:46 +0800 |
---|---|---|
committer | YunQiang Su <yunqiang.su@cipunited.com> | 2023-06-05 11:00:15 +0800 |
commit | a0631c1501c113c04891c9a24a9ff5276257f28d (patch) | |
tree | 7696a5432fc270ecc1fc2d5d469f7db8d9e0756b /ld/testsuite/ld-elf | |
parent | cb81e84c72933a7fad10b75b7e270d92d8d65251 (diff) | |
download | gdb-a0631c1501c113c04891c9a24a9ff5276257f28d.zip gdb-a0631c1501c113c04891c9a24a9ff5276257f28d.tar.gz gdb-a0631c1501c113c04891c9a24a9ff5276257f28d.tar.bz2 |
MIPS: fix some ld testcases with compiler
1. config/default.exp:
use -mabi=32 not for -gnuabi64
xfail_from_runlist: remove an element and mark it xfail.
2. ld-elf/indirect.exp: xfail
indirect5a indirect5b indirect6a indirect6b
indirect5c indirect5d indirect6c indirect6d
3. ld-elf/pr23658-2: mips output is not common
4. ld-elf/shared.exp: non-run on mips: Build libpr16496b.so
5. ld-elfvers/vers.exp:
xfail vers4, vers4b
no-run on mips: vers24a, vers24b, vers24c
6. ld-gc/gc.exp: add -KPIC into asflags for pr13683, pr14265, pr19161
7. ld-mips-elf/mips-elf.exp:
use noarch for mips16-local-stubs-1, since it use -mips4
8. ld-plugin/lto.exp:
no-run on mips/linux: PR ld/12982
add -KPIC into asflags for lto-3r, lto-5r, PR ld/19317 (2)
xfail PR ld/15323 (4), PR ld/19317 (3)
9. ld-plugin/plugin.exp: xfail
plugin claimfile lost symbol
plugin claimfile replace symbol
plugin claimfile replace symbol
plugin claimfile lost symbol with source
plugin claimfile replace symbol with source
plugin claimfile resolve symbol with source
plugin 2 with source lib
load plugin 2 with source
plugin 3 with source lib
load plugin 3 with source
11. ld-selective/selective.exp: add -fno-PIC, which is needed for -mno-abicalls
12. ld-shared/shared.exp: xfail shared (non PIC), shared (PIC main, non PIC so)
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r-- | ld/testsuite/ld-elf/indirect.exp | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr23658-2.rd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/shared.exp | 12 |
3 files changed, 16 insertions, 6 deletions
diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp index ce47713..dfbb097 100644 --- a/ld/testsuite/ld-elf/indirect.exp +++ b/ld/testsuite/ld-elf/indirect.exp @@ -219,7 +219,9 @@ proc check_dynamic_syms { test } { foreach t [list indirect5a indirect5b indirect6a indirect6b] { set testname [concat $t "dynsym"] - if { [check_dynamic_syms tmpdir/$t] } { + if { [istarget mips*] } { + xfail $testname + } elseif { [check_dynamic_syms tmpdir/$t] } { pass $testname } else { fail $testname @@ -252,7 +254,9 @@ run_ld_link_exec_tests $pie_tests foreach t [list indirect5c indirect5d indirect6c indirect6d] { set testname [concat $t "dynsym"] - if { [check_dynamic_syms tmpdir/$t] } { + if { [istarget mips*] } { + xfail $testname + } elseif { [check_dynamic_syms tmpdir/$t] } { pass $testname } else { fail $testname diff --git a/ld/testsuite/ld-elf/pr23658-2.rd b/ld/testsuite/ld-elf/pr23658-2.rd index 9f89c4b..e414ae3 100644 --- a/ld/testsuite/ld-elf/pr23658-2.rd +++ b/ld/testsuite/ld-elf/pr23658-2.rd @@ -1,5 +1,5 @@ #... - +[0-9]+ +\.interp \.note.4 \.note.1 \.note.2 \.note.3.* + +[0-9]+ +(\.MIPS\.abiflags \.MIPS\.options \.dynamic \.hash \.dynsym \.dynstr \.text |)\.interp \.note.4 \.note.1 \.note.2 \.note.3.* #... +[0-9]+ +\.note\.4 \.note\.1 + +[0-9]+ +\.note\.2 .note\.3 + diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index 1eef9f4..2019275 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -774,9 +774,6 @@ set build_tests { {"Build libpr16496b.a" "" "-fPIC" {pr16496b.c} {} "libpr16496b.a"} - {"Build libpr16496b.so" - "-shared -Wl,--no-as-needed tmpdir/pr16496b.o tmpdir/libpr16496a.so" "" - {dummy.c} {{objdump {-R} pr16496b.od}} "libpr16496b.so"} {"Build libpr16452a.so" "-shared -Wl,-soname,libpr16452a.so,--version-script=pr16452.map" "-fPIC" {pr16452a.c} {} "libpr16452a.so"} @@ -797,6 +794,15 @@ set build_tests { {pr18458b.c} {} "libpr18458b.so"} } +# MIPS PIC uses different way: .MIPS.stub +if { ![istarget mips*-linux*] } { + append build_tests { + {"Build libpr16496b.so" + "-shared -Wl,--no-as-needed tmpdir/pr16496b.o tmpdir/libpr16496a.so" "" + {dummy.c} {{objdump {-R} pr16496b.od}} "libpr16496b.so"} + } +} + run_cc_link_tests [list \ [list \ "Build libpr2404a.so" \ |