diff options
author | Renlin Li <renlin.li@arm.com> | 2017-10-26 15:40:45 +0100 |
---|---|---|
committer | Renlin Li <renlin.li@arm.com> | 2017-10-26 15:43:44 +0100 |
commit | 506981afaf6c77fbc26bcdc2eb4c24edca4255ef (patch) | |
tree | f2476073b893f74c2040e3ac2274de00792614cd /ld | |
parent | 4062f504eba4835579bcc360e9eff3e7d92f5a6c (diff) | |
download | gdb-506981afaf6c77fbc26bcdc2eb4c24edca4255ef.zip gdb-506981afaf6c77fbc26bcdc2eb4c24edca4255ef.tar.gz gdb-506981afaf6c77fbc26bcdc2eb4c24edca4255ef.tar.bz2 |
[PR21703]Adjust pr21703 tests on various targets.
xfail tests for certain targets.
Check shared library support for shared test.
Relax pr21703-r.sd and pr21703-shared.sd with additional "#..." pattern lines.
ld/
* testsuite/ld-elf/elf.exp: xfail pr21703 tests on specific targets.
Only run shared lib test for targets which support it.
* testsuite/ld-elf/pr21703-r.sd: Adjust the expected output.
* testsuite/ld-elf/pr21703-shared.sd: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/elf.exp | 35 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr21703-r.sd | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr21703-shared.sd | 3 |
4 files changed, 41 insertions, 9 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 31600f0..09f85bb 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2017-10-26 Renlin Li <renlin.li@arm.com> + + * testsuite/ld-elf/elf.exp: xfail pr21703 tests on specific targets. + Only run shared lib test for targets which support it. + * testsuite/ld-elf/pr21703-r.sd: Adjust the expected output. + * testsuite/ld-elf/pr21703-shared.sd: Likewise. + 2017-10-26 James Greenhalgh <james.greenhalgh@arm.com> * testsuite/ld-arm/cortex-a8-far.d: Update expected disassembly. diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp index eac29e0..1fe38eb 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -70,17 +70,23 @@ run_ld_link_tests [list \ {symbol3w.s} {} "symbol3w.a" ] \ ] -run_ld_link_tests [list \ - [list "PR ld/21703" \ +# These targets use _bfd_generic_link_add_symbols instead of +# bfd_elf_link_add_symbols +setup_xfail "d30v-*-*" "dlx-*-*" "pj-*-*" +run_ld_link_tests { + {"PR ld/21703" "--allow-multiple-definition tmpdir/pr21703-1.o tmpdir/pr21703-2.o" "" "" \ - {pr21703-1.s pr21703-2.s} {{readelf {-s} pr21703.sd}} "pr21703" ] \ - [list "PR ld/21703 -r" \ + {pr21703-1.s pr21703-2.s} {{readelf {-s} pr21703.sd}} "pr21703" } +} + +# These targets use _bfd_generic_link_add_symbols instead of +# bfd_elf_link_add_symbols +setup_xfail "d30v-*-*" "dlx-*-*" "pj-*-*" +run_ld_link_tests { + {"PR ld/21703 -r" "-r --allow-multiple-definition tmpdir/pr21703-3.o tmpdir/pr21703-4.o" "" "" \ - {pr21703-3.s pr21703-4.s} {{readelf {-s} pr21703-r.sd}} "pr21703.o" ] \ - [list "PR ld/21703 shared" \ - "-shared --allow-multiple-definition --version-script pr21703.ver tmpdir/pr21703-3.o tmpdir/pr21703-4.o" "" "" \ - {pr21703-3.s pr21703-4.s} {{readelf {--dyn-syms} pr21703-shared.sd}} "pr21703.so" ] \ -] + {pr21703-3.s pr21703-4.s} {{readelf {-s} pr21703-r.sd}} "pr21703.o" } +} if { [check_shared_lib_support] } then { run_ld_link_tests { @@ -98,6 +104,17 @@ if { [check_shared_lib_support] } then { "--no-dynamic-linker tmpdir/pr14170a.o tmpdir/pr14170.so" "" $hpux \ {pr14170c.s} { } "pr14170" ] \ ] + + # These targets use _bfd_generic_link_add_symbols instead of + # bfd_elf_link_add_symbols + setup_xfail "d30v-*-*" "dlx-*-*" "pj-*-*" + setup_xfail "tic6x-*-*" "hppa64-*-*" + run_ld_link_tests { + {"PR ld/21703 shared" + "-shared --allow-multiple-definition --version-script pr21703.ver tmpdir/pr21703-3.o tmpdir/pr21703-4.o" "" "" \ + {pr21703-3.s pr21703-4.s} {{readelf {--dyn-syms} pr21703-shared.sd}} "pr21703.so" } + } + } # Only run these tests on targets that support creating shared libraries. diff --git a/ld/testsuite/ld-elf/pr21703-r.sd b/ld/testsuite/ld-elf/pr21703-r.sd index 6758088..fba756d 100644 --- a/ld/testsuite/ld-elf/pr21703-r.sd +++ b/ld/testsuite/ld-elf/pr21703-r.sd @@ -1,9 +1,14 @@ Symbol table '.symtab' contains .* entries: #... .*: [0-9a-fA-F]* +4 +FUNC +GLOBAL +DEFAULT +. foo@FOO +#... .*: [0-9a-fA-F]* +32 +FUNC +GLOBAL +DEFAULT +. foo1 +#... .*: [0-9a-fA-F]* +32 +FUNC +GLOBAL +DEFAULT +. foo@@FOO1 +#... .*: [0-9a-fA-F]* +8 +FUNC +GLOBAL +DEFAULT +. bar1 +#... .*: [0-9a-fA-F]* +4 +FUNC +GLOBAL +DEFAULT +. foo +#... .*: [0-9a-fA-F]* +16 +FUNC +GLOBAL +DEFAULT +. bar #pass diff --git a/ld/testsuite/ld-elf/pr21703-shared.sd b/ld/testsuite/ld-elf/pr21703-shared.sd index 9b6b1b9..9ca541c 100644 --- a/ld/testsuite/ld-elf/pr21703-shared.sd +++ b/ld/testsuite/ld-elf/pr21703-shared.sd @@ -2,7 +2,10 @@ Symbol table '\.dynsym' contains [0-9]+ entries: +Num: +Value +Size Type +Bind +Vis +Ndx Name #... +[0-9]+: +[0-9a-f]+ +4 +FUNC +GLOBAL +DEFAULT +[0-9] +foo@FOO +#... +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +ABS +FOO1 +#... +[0-9]+: +[0-9a-f]+ +32 +FUNC +GLOBAL +DEFAULT +[0-9] +foo@@FOO1 +#... +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +ABS +FOO #... |