diff options
author | Alan Modra <amodra@gmail.com> | 2016-12-03 20:59:43 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-12-03 20:59:43 +1030 |
commit | 4e95fbcd79b84308417fc25ce12cacdb2a61c0d0 (patch) | |
tree | 3a229b0df5742747ab889fb9ed603ba270dd948c /ld/testsuite/ld-elfvers | |
parent | ca16c5b392b1c78019fea1710c4f4433161626c5 (diff) | |
download | gdb-4e95fbcd79b84308417fc25ce12cacdb2a61c0d0.zip gdb-4e95fbcd79b84308417fc25ce12cacdb2a61c0d0.tar.gz gdb-4e95fbcd79b84308417fc25ce12cacdb2a61c0d0.tar.bz2 |
PowerPC64 dot-sym testsuite fixes
This illustrates quite well why dot-symbols had to go. PowerPC64 gcc
for Linux stopped producing them 12 years ago, but the Linux kernel
still persists in using them so it's necessary to keep and
regression test ld support.
* testsuite/ld-elf/indirect1b.c: Give dot-symbol a version too.
* testsuite/ld-elf/indirect2.c: Likewise.
* testsuite/ld-elf/indirect3b.c: Likewise.
* testsuite/ld-elf/indirect4b.c: Likewise.
* testsuite/ld-elf/pr18718.c: Likewise.
* testsuite/ld-elf/pr18720b.c: Likewise.
* testsuite/ld-elf/pr19553c.c: Likewise.
* testsuite/ld-elfvers/vers.h (FUNC_SYMVER): Define.
* testsuite/ld-elfvers/vers1.c: Use FUNC_SYMVER for functions.
* testsuite/ld-elfvers/vers4.c: Likewise.
* testsuite/ld-elfvers/vers5.c: Likewise.
* testsuite/ld-elfvers/vers6.c: Likewise.
* testsuite/ld-elfvers/vers7a.c: Likewise.
* testsuite/ld-elfvers/vers9.c: Likewise.
* testsuite/ld-elfvers/vers15.c: Likewise.
* testsuite/ld-elfvers/vers18.c: Likewise.
* testsuite/ld-elfvers/vers22a.c: Likewise.
* testsuite/ld-elfvers/vers23a.c: Likewise.
* testsuite/ld-elfvers/vers27d1.c: Likewise.
* testsuite/ld-elfvers/vers21.c: Likewise.
(_old_bar): Use attribute weak rather than asm weak.
* testsuite/ld-ifunc/pr16467b.c: Give dot-symbol a version.
* testsuite/ld-plugin/pr12760b.c: Define warning on .bar rather than
bar for ppc64 -mcall-aixdesc.
* testsuite/ld-plugin/pr16746a.c: Similarly for foobar.
* testsuite/ld-plugin/pr16746b.c: Likewise.
* testsuite/ld-elf/shared.exp: Allow dot-symbol in warnings and errors.
* testsuite/ld-plugin/lto.exp: Likewise.
* testsuite/ld-plugin/plugin-6.d: Likewise.
* testsuite/ld-plugin/plugin-7.d: Likewise.
* testsuite/ld-plugin/plugin-8.d: Likewise.
* testsuite/ld-plugin/plugin-13.d: Likewise.
* testsuite/ld-plugin/plugin-14.d: Likewise.
* testsuite/ld-plugin/plugin-15.d: Likewise.
* testsuite/ld-plugin/plugin-16.d: Likewise.
* testsuite/ld-plugin/plugin-20.d: Likewise.
* testsuite/ld-plugin/plugin-21.d: Likewise.
* testsuite/ld-plugin/plugin-22.d: Likewise.
* testsuite/ld-plugin/plugin-23.d: Likewise.
* testsuite/ld-plugin/plugin.exp: Define .main and .puts for ppc64
-mcall-aixdesc.
* testsuite/ld-elfvers/vers.exp (test_ar): Trim dot-symbols.
(objdump_dynsymstuff): Likewise.
(objdump_symstuff): Likewise. Pack flags to keep column count
consistent.
* testsuite/ld-elfweak/elfweak.exp (objdump_dynsymstuff,
objdump_symstuff): As for vers.exp.
* testsuite/ld-elfvers/vers6.sym: Allow dot-symbols.
* testsuite/ld-elfvers/vers1.sym: Allow missing F flag for
-mcall-aixdesc .opd syms and adjust for flag packing.
* testsuite/ld-elfvers/vers4.sym: Likewise.
* testsuite/ld-elfvers/vers4a.sym: Likewise.
* testsuite/ld-elfvers/vers7a.sym: Likewise.
* testsuite/ld-elfvers/vers9.sym: Likewise.
* testsuite/ld-elfvers/vers15.sym: Likewise.
* testsuite/ld-elfvers/vers18.sym: Likewise.
* testsuite/ld-elfvers/vers21.sym: Likewise.
* testsuite/ld-elfvers/vers22a.sym: Likewise.
* testsuite/ld-elfvers/vers23a.sym: Likewise.
* testsuite/ld-elfvers/vers27d.sym: Likewise.
* testsuite/ld-elfweak/strong.sym: Likewise.
* testsuite/ld-elfweak/strongcomm.sym: Likewise.
* testsuite/ld-elfweak/strongdata.sym: Likewise.
Diffstat (limited to 'ld/testsuite/ld-elfvers')
26 files changed, 85 insertions, 77 deletions
diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp index a2a678b..4c42342 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -122,9 +122,9 @@ proc test_ar { test lib object expect } { return } - verbose -log "$nm --print-armap $tmpdir/$lib | grep \" in \" | egrep \"VERS\\|bar\\|foo\" | sort > $tmpdir/nm.out" - - catch "exec $nm --print-armap $tmpdir/$lib | grep \\\ in\\\ | egrep VERS\\\|bar\\\|foo | sort > $tmpdir/nm.out" exec_output + set cmd "$nm --print-armap $tmpdir/$lib | grep \\\ in\\\ | egrep VERS\\\|bar\\\|foo | grep -v ^\\\\. | sort > $tmpdir/nm.out" + verbose -log $cmd + catch "exec $cmd" exec_output if [string match "" $exec_output] then { catch "exec sort $srcdir/$subdir/$expect | $diff $tmpdir/nm.out -" exec_output set exec_output [prune_warnings $exec_output] @@ -245,9 +245,9 @@ proc objdump_symstuff { objdump object expectfile } { if ![info exists SOBJDUMP_FLAGS] { set SOBJDUMP_FLAGS "" } - verbose -log "$objdump $SOBJDUMP_FLAGS $object | grep \@ | sort -k 6 > $tmpdir/objdump.out" - - catch "exec $objdump $SOBJDUMP_FLAGS $object | grep \@ | sort -k 6 > $tmpdir/objdump.out" exec_output + set cmd "$objdump $SOBJDUMP_FLAGS $object | sed -n {s/^\\(\[0-9a-f\]* *\\)\\(\[gw\]\\)\\( *\\)\\(\[FO\]\\)/\\1\\2\\4\\3/;/\@/p} | sort -k 5 > $tmpdir/objdump.out" + verbose -log $cmd + catch "exec $cmd" exec_output set exec_output [prune_warnings $exec_output] if [string match "" $exec_output] then { @@ -286,7 +286,8 @@ proc objdump_symstuff { objdump object expectfile } { close $file_a while { [gets $file_b line] != $eof } { - if [regexp "^#.*$" $line] then { + if [regexp {\.text.* \.[^ ]*$} $line] then { + # Discard defined powerpc64 dot-symbols continue } else { lappend list_b $line @@ -340,9 +341,9 @@ proc objdump_dynsymstuff { objdump object expectfile } { if ![info exists DOBJDUMP_FLAGS] { set DOBJDUMP_FLAGS "" } - verbose -log "$objdump $DOBJDUMP_FLAGS $object | sed -n /VERS/p\\\;/show/p | sort | uniq > $tmpdir/objdump.out" - - catch "exec $objdump $DOBJDUMP_FLAGS $object | sed -n /VERS/p\\\;/show/p | sort | uniq > $tmpdir/objdump.out" exec_output + set cmd "$objdump $DOBJDUMP_FLAGS $object | sed -n /VERS/p\\\;/show/p | sort | uniq > $tmpdir/objdump.out" + verbose -log $cmd + catch "exec $cmd" exec_output set exec_output [prune_warnings $exec_output] if [string match "" $exec_output] then { @@ -381,7 +382,8 @@ proc objdump_dynsymstuff { objdump object expectfile } { close $file_a while { [gets $file_b line] != $eof } { - if [regexp "^#.*$" $line] then { + if [regexp {\.text.* \.[^ ]*$} $line] then { + # Discard defined powerpc64 dot-symbols continue } else { lappend list_b $line diff --git a/ld/testsuite/ld-elfvers/vers.h b/ld/testsuite/ld-elfvers/vers.h index 4455527..00385f0 100644 --- a/ld/testsuite/ld-elfvers/vers.h +++ b/ld/testsuite/ld-elfvers/vers.h @@ -7,3 +7,10 @@ /* Generate a .symver reference with symbol prefixes. Usage: SYMVER(foo, foobar@ver); */ #define SYMVER(name, name2) __asm__(".symver " SYMPFX(name) "," SYMPFX(name2)) + +#if defined __powerpc64__ && defined _CALL_AIXDESC && !defined _CALL_LINUX +#define FUNC_SYMVER(name, name2) SYMVER(name, name2); \ + __asm__(".symver ." SYMPFX(name) ",." SYMPFX(name2)) +#else +#define FUNC_SYMVER(name, name2) SYMVER(name, name2) +#endif diff --git a/ld/testsuite/ld-elfvers/vers1.c b/ld/testsuite/ld-elfvers/vers1.c index 86e2bd2..9813fd3 100644 --- a/ld/testsuite/ld-elfvers/vers1.c +++ b/ld/testsuite/ld-elfvers/vers1.c @@ -49,10 +49,10 @@ hide_new_foo() } -SYMVER(hide_original_foo, show_foo@); -SYMVER(hide_old_foo, show_foo@VERS_1.1); -SYMVER(hide_old_foo1, show_foo@VERS_1.2); -SYMVER(hide_new_foo, show_foo@@VERS_2.0); +FUNC_SYMVER(hide_original_foo, show_foo@); +FUNC_SYMVER(hide_old_foo, show_foo@VERS_1.1); +FUNC_SYMVER(hide_old_foo1, show_foo@VERS_1.2); +FUNC_SYMVER(hide_new_foo, show_foo@@VERS_2.0); @@ -65,7 +65,7 @@ hide_new_bogus_foo() return 1000+bar(); } -SYMVER(hide_new_bogus_foo, show_foo@VERS_2.2); +FUNC_SYMVER(hide_new_bogus_foo, show_foo@VERS_2.2); #endif @@ -83,8 +83,8 @@ xyzzz() bar33(); } -SYMVER(new2_foo, fooVERS_2.0); -SYMVER(bar33, bar@@VERS_2.0); +FUNC_SYMVER(new2_foo, fooVERS_2.0); +FUNC_SYMVER(bar33, bar@@VERS_2.0); #endif #ifdef DO_TEST12 @@ -99,5 +99,5 @@ xyzzz() bar33(); } -SYMVER(bar33, bar@@VERS_2.0); +FUNC_SYMVER(bar33, bar@@VERS_2.0); #endif diff --git a/ld/testsuite/ld-elfvers/vers1.sym b/ld/testsuite/ld-elfvers/vers1.sym index 0196109..206863f 100644 --- a/ld/testsuite/ld-elfvers/vers1.sym +++ b/ld/testsuite/ld-elfvers/vers1.sym @@ -1,4 +1,4 @@ -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@ -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@@VERS_2\.0 -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@VERS_1\.1 -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@VERS_1\.2 +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@ +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@@VERS_2\.0 +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@VERS_1\.1 +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@VERS_1\.2 diff --git a/ld/testsuite/ld-elfvers/vers15.c b/ld/testsuite/ld-elfvers/vers15.c index 2457d29..a7c044a 100644 --- a/ld/testsuite/ld-elfvers/vers15.c +++ b/ld/testsuite/ld-elfvers/vers15.c @@ -32,6 +32,6 @@ main() return 0; } -SYMVER(foo_1, show_foo@); -SYMVER(foo_2, show_foo@VERS_1.1); -SYMVER(foo_3, show_foo@@VERS_1.2); +FUNC_SYMVER(foo_1, show_foo@); +FUNC_SYMVER(foo_2, show_foo@VERS_1.1); +FUNC_SYMVER(foo_3, show_foo@@VERS_1.2); diff --git a/ld/testsuite/ld-elfvers/vers15.sym b/ld/testsuite/ld-elfvers/vers15.sym index fe56a24..ccf4f4d 100644 --- a/ld/testsuite/ld-elfvers/vers15.sym +++ b/ld/testsuite/ld-elfvers/vers15.sym @@ -1,3 +1,3 @@ -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@ -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@@VERS_1\.2 -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@VERS_1\.1 +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@ +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@@VERS_1\.2 +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@VERS_1\.1 diff --git a/ld/testsuite/ld-elfvers/vers18.c b/ld/testsuite/ld-elfvers/vers18.c index 9965b88..fe1017b 100644 --- a/ld/testsuite/ld-elfvers/vers18.c +++ b/ld/testsuite/ld-elfvers/vers18.c @@ -38,7 +38,7 @@ hide_new_foo () return 1000 + bar (); } -SYMVER(hide_original_foo, show_foo@); -SYMVER(hide_old_foo, show_foo@VERS_1.1); -SYMVER(hide_old_foo1, show_foo@VERS_1.2); -SYMVER(hide_new_foo, show_foo@@VERS_2.0); +FUNC_SYMVER(hide_original_foo, show_foo@); +FUNC_SYMVER(hide_old_foo, show_foo@VERS_1.1); +FUNC_SYMVER(hide_old_foo1, show_foo@VERS_1.2); +FUNC_SYMVER(hide_new_foo, show_foo@@VERS_2.0); diff --git a/ld/testsuite/ld-elfvers/vers18.sym b/ld/testsuite/ld-elfvers/vers18.sym index 62890d7..04fa49c 100644 --- a/ld/testsuite/ld-elfvers/vers18.sym +++ b/ld/testsuite/ld-elfvers/vers18.sym @@ -1,4 +1,4 @@ -[0-9a-f]+ +w +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@ -[0-9a-f]+ +w +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@@VERS_2\.0 -[0-9a-f]+ +w +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@VERS_1\.1 -[0-9a-f]+ +w +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@VERS_1\.2 +[0-9a-f]+ +w(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@ +[0-9a-f]+ +w(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@@VERS_2\.0 +[0-9a-f]+ +w(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@VERS_1\.1 +[0-9a-f]+ +w(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@VERS_1\.2 diff --git a/ld/testsuite/ld-elfvers/vers21.c b/ld/testsuite/ld-elfvers/vers21.c index 3a75b48..4a994a1 100644 --- a/ld/testsuite/ld-elfvers/vers21.c +++ b/ld/testsuite/ld-elfvers/vers21.c @@ -1,9 +1,8 @@ #include "vers.h" -SYMVER(_old_foo, foo@VERS.0); -SYMVER(_old_bar, bar@VERS.0); +FUNC_SYMVER(_old_foo, foo@VERS.0); +FUNC_SYMVER(_old_bar, bar@VERS.0); SYMVER(_old_foobar, foobar@VERS.0); -__asm__(".weak " SYMPFX(_old_bar)); int bar () @@ -11,7 +10,7 @@ bar () return 1; } -int +int __attribute__ ((weak)) _old_bar () { return bar (); diff --git a/ld/testsuite/ld-elfvers/vers21.sym b/ld/testsuite/ld-elfvers/vers21.sym index 271ca79..f5ade0b 100644 --- a/ld/testsuite/ld-elfvers/vers21.sym +++ b/ld/testsuite/ld-elfvers/vers21.sym @@ -1,3 +1,3 @@ -[0-9a-f]+[ ]+w[ ]+F[ ]+\.(text|opd)[ ]+[0-9a-f]+ (0x[0-9a-f]+ )?_?bar@VERS\.0 -[0-9a-f]+[ ]+g[ ]+F[ ]+\.(text|opd)[ ]+[0-9a-f]+ (0x[0-9a-f]+ )?_?foo@VERS\.0 -[0-9a-f]+[ ]+g[ ]+O[ ]+\.s?data[ ]+[0-9a-f]+ (0x[0-9a-f]+ )?_?foobar@VERS\.0 +[0-9a-f]+ +w(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?bar@VERS\.0 +[0-9a-f]+ +g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@VERS\.0 +[0-9a-f]+ +gO +\.s?data [0-9a-f]+ (0x[0-9a-f]+ )?_?foobar@VERS\.0 diff --git a/ld/testsuite/ld-elfvers/vers22a.c b/ld/testsuite/ld-elfvers/vers22a.c index bc5777b..9a5fcac 100644 --- a/ld/testsuite/ld-elfvers/vers22a.c +++ b/ld/testsuite/ld-elfvers/vers22a.c @@ -1,6 +1,6 @@ #include "vers.h" -SYMVER(_old_bar, bar@VERS.0); +FUNC_SYMVER(_old_bar, bar@VERS.0); void _old_bar () diff --git a/ld/testsuite/ld-elfvers/vers22a.sym b/ld/testsuite/ld-elfvers/vers22a.sym index c3f4150..cddf0c6 100644 --- a/ld/testsuite/ld-elfvers/vers22a.sym +++ b/ld/testsuite/ld-elfvers/vers22a.sym @@ -1 +1 @@ -[0-9a-f]+[ ]+g[ ]+F[ ]+\.(text|opd)[ ]+[0-9a-f]+ (0x[0-9a-f]+ )?_?bar@VERS.0 +[0-9a-f]+ +g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?bar@VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers23a.c b/ld/testsuite/ld-elfvers/vers23a.c index 13c8edd..9edbba3 100644 --- a/ld/testsuite/ld-elfvers/vers23a.c +++ b/ld/testsuite/ld-elfvers/vers23a.c @@ -1,6 +1,6 @@ #include "vers.h" -SYMVER(_old_bar, bar@VERS.0); +FUNC_SYMVER(_old_bar, bar@VERS.0); void _old_bar (void) diff --git a/ld/testsuite/ld-elfvers/vers23a.sym b/ld/testsuite/ld-elfvers/vers23a.sym index c3f4150..cddf0c6 100644 --- a/ld/testsuite/ld-elfvers/vers23a.sym +++ b/ld/testsuite/ld-elfvers/vers23a.sym @@ -1 +1 @@ -[0-9a-f]+[ ]+g[ ]+F[ ]+\.(text|opd)[ ]+[0-9a-f]+ (0x[0-9a-f]+ )?_?bar@VERS.0 +[0-9a-f]+ +g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?bar@VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers27d.sym b/ld/testsuite/ld-elfvers/vers27d.sym index d20bd1d..9133ed0 100644 --- a/ld/testsuite/ld-elfvers/vers27d.sym +++ b/ld/testsuite/ld-elfvers/vers27d.sym @@ -1 +1 @@ -[0-9a-f]+[ ]+g[ ]+F[ ]+\.(text|opd)[ ]+[0-9a-f]+ (0x[0-9a-f]+ )?_?foo@VERS\.0 +[0-9a-f]+ +g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@VERS\.0 diff --git a/ld/testsuite/ld-elfvers/vers27d1.c b/ld/testsuite/ld-elfvers/vers27d1.c index 107e1c1..00fab8d 100644 --- a/ld/testsuite/ld-elfvers/vers27d1.c +++ b/ld/testsuite/ld-elfvers/vers27d1.c @@ -5,4 +5,4 @@ foo () { } -SYMVER(foo, foo@VERS.0); +FUNC_SYMVER(foo, foo@VERS.0); diff --git a/ld/testsuite/ld-elfvers/vers4.c b/ld/testsuite/ld-elfvers/vers4.c index 46ac432..eed0595 100644 --- a/ld/testsuite/ld-elfvers/vers4.c +++ b/ld/testsuite/ld-elfvers/vers4.c @@ -22,7 +22,7 @@ new_foo() } -SYMVER(new_foo, foo@@VERS_2.0); +FUNC_SYMVER(new_foo, foo@@VERS_2.0); int main() diff --git a/ld/testsuite/ld-elfvers/vers4.sym b/ld/testsuite/ld-elfvers/vers4.sym index c48d1bb..6511fc3 100644 --- a/ld/testsuite/ld-elfvers/vers4.sym +++ b/ld/testsuite/ld-elfvers/vers4.sym @@ -1 +1 @@ -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@@VERS_2\.0 +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@@VERS_2\.0 diff --git a/ld/testsuite/ld-elfvers/vers4a.sym b/ld/testsuite/ld-elfvers/vers4a.sym index c48d1bb..6511fc3 100644 --- a/ld/testsuite/ld-elfvers/vers4a.sym +++ b/ld/testsuite/ld-elfvers/vers4a.sym @@ -1 +1 @@ -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@@VERS_2\.0 +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@@VERS_2\.0 diff --git a/ld/testsuite/ld-elfvers/vers5.c b/ld/testsuite/ld-elfvers/vers5.c index 3cae67e..8b1b536 100644 --- a/ld/testsuite/ld-elfvers/vers5.c +++ b/ld/testsuite/ld-elfvers/vers5.c @@ -41,10 +41,10 @@ new_foo() } -SYMVER(original_foo, foo@); -SYMVER(old_foo, foo@VERS_1.1); -SYMVER(old_foo1, foo@VERS_1.2); -SYMVER(new_foo, foo@@VERS_1.2); +FUNC_SYMVER(original_foo, foo@); +FUNC_SYMVER(old_foo, foo@VERS_1.1); +FUNC_SYMVER(old_foo1, foo@VERS_1.2); +FUNC_SYMVER(new_foo, foo@@VERS_1.2); int main () diff --git a/ld/testsuite/ld-elfvers/vers6.c b/ld/testsuite/ld-elfvers/vers6.c index cb1c93f..5b72626 100644 --- a/ld/testsuite/ld-elfvers/vers6.c +++ b/ld/testsuite/ld-elfvers/vers6.c @@ -20,7 +20,7 @@ main() return 0; } -SYMVER(foo_1, show_foo@); -SYMVER(foo_2, show_foo@VERS_1.1); -SYMVER(foo_3, show_foo@VERS_1.2); -SYMVER(foo_4, show_foo@VERS_2.0); +FUNC_SYMVER(foo_1, show_foo@); +FUNC_SYMVER(foo_2, show_foo@VERS_1.1); +FUNC_SYMVER(foo_3, show_foo@VERS_1.2); +FUNC_SYMVER(foo_4, show_foo@VERS_2.0); diff --git a/ld/testsuite/ld-elfvers/vers6.sym b/ld/testsuite/ld-elfvers/vers6.sym index ae68d72..10a3966 100644 --- a/ld/testsuite/ld-elfvers/vers6.sym +++ b/ld/testsuite/ld-elfvers/vers6.sym @@ -1,4 +1,4 @@ -0+ *F? *\*UND\* 0+ _?show_foo@ -0+ *F? *\*UND\* 0+ _?show_foo@VERS_1\.1 -0+ *F? *\*UND\* 0+ _?show_foo@VERS_1\.2 -0+ *F? *\*UND\* 0+ _?show_foo@VERS_2\.0 +0+ *F? *\*UND\* 0+ \.?_?show_foo@ +0+ *F? *\*UND\* 0+ \.?_?show_foo@VERS_1\.1 +0+ *F? *\*UND\* 0+ \.?_?show_foo@VERS_1\.2 +0+ *F? *\*UND\* 0+ \.?_?show_foo@VERS_2\.0 diff --git a/ld/testsuite/ld-elfvers/vers7a.c b/ld/testsuite/ld-elfvers/vers7a.c index f3d2a2d..8fcad79 100644 --- a/ld/testsuite/ld-elfvers/vers7a.c +++ b/ld/testsuite/ld-elfvers/vers7a.c @@ -16,5 +16,5 @@ __b_internal (int e) return e + 42; } -SYMVER(__a_internal, hide_a@@VERS_1); -SYMVER(__b_internal, show_b@@VERS_1); +FUNC_SYMVER(__a_internal, hide_a@@VERS_1); +FUNC_SYMVER(__b_internal, show_b@@VERS_1); diff --git a/ld/testsuite/ld-elfvers/vers7a.sym b/ld/testsuite/ld-elfvers/vers7a.sym index ef8d04b..8b37561 100644 --- a/ld/testsuite/ld-elfvers/vers7a.sym +++ b/ld/testsuite/ld-elfvers/vers7a.sym @@ -1,2 +1,2 @@ -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?hide_a@@VERS_1 -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_b@@VERS_1 +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?hide_a@@VERS_1 +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?show_b@@VERS_1 diff --git a/ld/testsuite/ld-elfvers/vers9.c b/ld/testsuite/ld-elfvers/vers9.c index 5079364..f70b0af 100644 --- a/ld/testsuite/ld-elfvers/vers9.c +++ b/ld/testsuite/ld-elfvers/vers9.c @@ -43,7 +43,7 @@ main() return 0; } -SYMVER(original_foo, foo@); -SYMVER(old_foo, foo@VERS_1.1); -SYMVER(old_foo1, foo@VERS_1.2); -SYMVER(new_foo, foo@@VERS_1.2); +FUNC_SYMVER(original_foo, foo@); +FUNC_SYMVER(old_foo, foo@VERS_1.1); +FUNC_SYMVER(old_foo1, foo@VERS_1.2); +FUNC_SYMVER(new_foo, foo@@VERS_1.2); diff --git a/ld/testsuite/ld-elfvers/vers9.sym b/ld/testsuite/ld-elfvers/vers9.sym index 2d46c47..28afa0d 100644 --- a/ld/testsuite/ld-elfvers/vers9.sym +++ b/ld/testsuite/ld-elfvers/vers9.sym @@ -1,4 +1,4 @@ -0+ *F? *\*UND\* 0+ _?foo@VERS_1\.2 -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@ -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@@VERS_1\.2 -[0-9a-f]+ g +F \.(text|opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@VERS_1\.1 +0+ *F? *\*UND\* 0+ \.?_?foo@VERS_1\.2 +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@ +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@@VERS_1\.2 +[0-9a-f]+ g(F +\.text|F? +\.opd) [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@VERS_1\.1 |