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/vers5.c | |
parent | 9a9e2ca332636b09a006031e086d88f9e6dba5ef (diff) | |
download | gdb-b9e33f301ea91a4d15666e882acd35e65ec68d41.zip gdb-b9e33f301ea91a4d15666e882acd35e65ec68d41.tar.gz 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/vers5.c')
-rw-r--r-- | ld/testsuite/ld-elfvers/vers5.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ld/testsuite/ld-elfvers/vers5.c b/ld/testsuite/ld-elfvers/vers5.c index cc6ea40..3cae67e 100644 --- a/ld/testsuite/ld-elfvers/vers5.c +++ b/ld/testsuite/ld-elfvers/vers5.c @@ -2,6 +2,8 @@ * Testcase to verify that foo@BAR and foo@@BAR are correctly detected * as a multiply defined symbol. */ +#include "vers.h" + const char * bar1 = "asdf"; const char * bar2 = "asdf"; @@ -39,10 +41,10 @@ new_foo() } -__asm__(".symver original_foo,foo@"); -__asm__(".symver old_foo,foo@VERS_1.1"); -__asm__(".symver old_foo1,foo@VERS_1.2"); -__asm__(".symver new_foo,foo@@VERS_1.2"); +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); int main () |