diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-12-10 06:08:11 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-12-10 06:08:11 +0000 |
commit | b9e33f301ea91a4d15666e882acd35e65ec68d41 (patch) | |
tree | a6fdf89cdcc6dc09c6047cce7092f1b63b6dafe8 /ld/testsuite/ld-elfvers/vers1.c | |
parent | 9a9e2ca332636b09a006031e086d88f9e6dba5ef (diff) | |
download | fsf-binutils-gdb-b9e33f301ea91a4d15666e882acd35e65ec68d41.zip fsf-binutils-gdb-b9e33f301ea91a4d15666e882acd35e65ec68d41.tar.gz fsf-binutils-gdb-b9e33f301ea91a4d15666e882acd35e65ec68d41.tar.bz2 |
ld: elfvers tests: support symbol prefixed targets
The symbol versioning tests mix C-visible symbols and linker-visible
symbols in order to verify .symver behavior. This works for most
people, but fail for targets that have a symbol prefix. So add a
helper file with macros that expand gcc's __USER_LABEL_PREFIX__ as
necessary and convert all .symver users over to it.
Now that the tests are usable on prefixed targets, update the tests
to take into account an optional leading underscore.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'ld/testsuite/ld-elfvers/vers1.c')
-rw-r--r-- | ld/testsuite/ld-elfvers/vers1.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ld/testsuite/ld-elfvers/vers1.c b/ld/testsuite/ld-elfvers/vers1.c index c27bc3b..86e2bd2 100644 --- a/ld/testsuite/ld-elfvers/vers1.c +++ b/ld/testsuite/ld-elfvers/vers1.c @@ -3,6 +3,8 @@ * a bunch of definitions of the same symbol, and we can theoretically * then link applications against varying sets of these. */ +#include "vers.h" + const char * show_bar1 = "asdf"; const char * show_bar2 = "asdf"; @@ -47,10 +49,10 @@ hide_new_foo() } -__asm__(".symver hide_original_foo,show_foo@"); -__asm__(".symver hide_old_foo,show_foo@VERS_1.1"); -__asm__(".symver hide_old_foo1,show_foo@VERS_1.2"); -__asm__(".symver hide_new_foo,show_foo@@VERS_2.0"); +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); @@ -63,7 +65,7 @@ hide_new_bogus_foo() return 1000+bar(); } -__asm__(".symver hide_new_bogus_foo,show_foo@VERS_2.2"); +SYMVER(hide_new_bogus_foo, show_foo@VERS_2.2); #endif @@ -81,8 +83,8 @@ xyzzz() bar33(); } -__asm__(".symver new2_foo,fooVERS_2.0"); -__asm__(".symver bar33,bar@@VERS_2.0"); +SYMVER(new2_foo, fooVERS_2.0); +SYMVER(bar33, bar@@VERS_2.0); #endif #ifdef DO_TEST12 @@ -97,5 +99,5 @@ xyzzz() bar33(); } -__asm__(".symver bar33,bar@@VERS_2.0"); +SYMVER(bar33, bar@@VERS_2.0); #endif |