ld: elfvers tests: support symbol prefixed targets
authorMike Frysinger <vapier@gentoo.org>
Fri, 10 Dec 2010 06:08:11 +0000 (06:08 +0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 10 Dec 2010 06:08:11 +0000 (06:08 +0000)
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>
66 files changed:
ld/testsuite/ChangeLog
ld/testsuite/ld-elf/pr9676.rd
ld/testsuite/ld-elf/pr9679.rd
ld/testsuite/ld-elfvers/vers.h [new file with mode: 0644]
ld/testsuite/ld-elfvers/vers1.c
ld/testsuite/ld-elfvers/vers1.dsym
ld/testsuite/ld-elfvers/vers1.sym
ld/testsuite/ld-elfvers/vers15.c
ld/testsuite/ld-elfvers/vers15.dsym
ld/testsuite/ld-elfvers/vers15.sym
ld/testsuite/ld-elfvers/vers16.dsym
ld/testsuite/ld-elfvers/vers16a.dsym
ld/testsuite/ld-elfvers/vers17.dsym
ld/testsuite/ld-elfvers/vers18.c
ld/testsuite/ld-elfvers/vers18.dsym
ld/testsuite/ld-elfvers/vers18.sym
ld/testsuite/ld-elfvers/vers19.dsym
ld/testsuite/ld-elfvers/vers2.dsym
ld/testsuite/ld-elfvers/vers20.dsym
ld/testsuite/ld-elfvers/vers21.c
ld/testsuite/ld-elfvers/vers21.dsym
ld/testsuite/ld-elfvers/vers21.sym
ld/testsuite/ld-elfvers/vers22.dsym
ld/testsuite/ld-elfvers/vers22a.c
ld/testsuite/ld-elfvers/vers22a.dsym
ld/testsuite/ld-elfvers/vers22a.sym
ld/testsuite/ld-elfvers/vers22b.dsym
ld/testsuite/ld-elfvers/vers23.dsym
ld/testsuite/ld-elfvers/vers23a.c
ld/testsuite/ld-elfvers/vers23a.dsym
ld/testsuite/ld-elfvers/vers23a.sym
ld/testsuite/ld-elfvers/vers23b.dsym
ld/testsuite/ld-elfvers/vers23d.dsym
ld/testsuite/ld-elfvers/vers24.rd
ld/testsuite/ld-elfvers/vers24a.c
ld/testsuite/ld-elfvers/vers24c.c
ld/testsuite/ld-elfvers/vers25a.dsym
ld/testsuite/ld-elfvers/vers26a.dsym
ld/testsuite/ld-elfvers/vers27a.dsym
ld/testsuite/ld-elfvers/vers27b.c
ld/testsuite/ld-elfvers/vers27d.dsym
ld/testsuite/ld-elfvers/vers27d.sym
ld/testsuite/ld-elfvers/vers27d1.c
ld/testsuite/ld-elfvers/vers27d4.dsym
ld/testsuite/ld-elfvers/vers28b.dsym
ld/testsuite/ld-elfvers/vers28c.dsym
ld/testsuite/ld-elfvers/vers29.dsym
ld/testsuite/ld-elfvers/vers3.dsym
ld/testsuite/ld-elfvers/vers30.dsym
ld/testsuite/ld-elfvers/vers31.dsym
ld/testsuite/ld-elfvers/vers32a.dsym
ld/testsuite/ld-elfvers/vers32b.dsym
ld/testsuite/ld-elfvers/vers4.c
ld/testsuite/ld-elfvers/vers4.sym
ld/testsuite/ld-elfvers/vers4a.dsym
ld/testsuite/ld-elfvers/vers4a.sym
ld/testsuite/ld-elfvers/vers5.c
ld/testsuite/ld-elfvers/vers6.c
ld/testsuite/ld-elfvers/vers6.dsym
ld/testsuite/ld-elfvers/vers6.sym
ld/testsuite/ld-elfvers/vers7a.c
ld/testsuite/ld-elfvers/vers7a.dsym
ld/testsuite/ld-elfvers/vers7a.sym
ld/testsuite/ld-elfvers/vers9.c
ld/testsuite/ld-elfvers/vers9.dsym
ld/testsuite/ld-elfvers/vers9.sym

index 6920a3721aa2cb2f88f2ee91cdceda9dfb2b46a8..ade0df6234dff797da634afe39e029817539a59c 100644 (file)
@@ -1,3 +1,32 @@
+2010-12-10  Mike Frysinger  <vapier@gentoo.org>
+
+       * ld-elfvers/vers.h: New file.
+       * ld-elfvers/vers1.c: Include vers.h.  Change asm(.symver) to SYMVER().
+       * ld-elfvers/vers4.c, ld-elfvers/vers5.c, ld-elfvers/vers6.c,
+       ld-elfvers/vers7a.c, ld-elfvers/vers9.c, ld-elfvers/vers15.c,
+       ld-elfvers/vers18.c, ld-elfvers/vers21.c, ld-elfvers/vers22a.c,
+       ld-elfvers/vers23a.c, ld-elfvers/vers24a.c, ld-elfvers/vers24c.c,
+       ld-elfvers/vers27d1.c: Likewise.
+
+       * ld-elf/pr9676.rd: Include _? in symbol match
+       * ld-elf/pr9676.rd, ld-elf/pr9679.rd, ld-elfvers/vers1.dsym,
+       ld-elfvers/vers1.sym, ld-elfvers/vers15.dsym, ld-elfvers/vers15.sym,
+       ld-elfvers/vers16.dsym, ld-elfvers/vers16a.dsym, ld-elfvers/vers17.dsym,
+       ld-elfvers/vers18.dsym, ld-elfvers/vers18.sym, ld-elfvers/vers19.dsym,
+       ld-elfvers/vers2.dsym, ld-elfvers/vers20.dsym, ld-elfvers/vers21.dsym,
+       ld-elfvers/vers21.sym, ld-elfvers/vers22.dsym, ld-elfvers/vers22a.dsym,
+       ld-elfvers/vers22a.sym, ld-elfvers/vers22b.dsym, ld-elfvers/vers23.dsym,
+       ld-elfvers/vers23a.dsym, ld-elfvers/vers23a.sym, ld-elfvers/vers23b.dsym,
+       ld-elfvers/vers23d.dsym, ld-elfvers/vers24.rd, ld-elfvers/vers25a.dsym,
+       ld-elfvers/vers26a.dsym, ld-elfvers/vers27a.dsym, ld-elfvers/vers27d.dsym,
+       ld-elfvers/vers27d.sym, ld-elfvers/vers27d4.dsym, ld-elfvers/vers28b.dsym,
+       ld-elfvers/vers28c.dsym, ld-elfvers/vers29.dsym, ld-elfvers/vers3.dsym,
+       ld-elfvers/vers30.dsym, ld-elfvers/vers31.dsym, ld-elfvers/vers32a.dsym,
+       ld-elfvers/vers32b.dsym, ld-elfvers/vers4.sym, ld-elfvers/vers4a.dsym,
+       ld-elfvers/vers4a.sym, ld-elfvers/vers6.dsym, ld-elfvers/vers6.sym,
+       ld-elfvers/vers7a.dsym, ld-elfvers/vers7a.sym, ld-elfvers/vers9.dsym,
+       ld-elfvers/vers9.sym: Likewise.
+
 2010-12-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        * ld-plugin/plugin-vis-1.d: Updated.
index 44a11cea2b7082f30efc91c03b882bdefc31c3a5..2d832dbe1e911a9384e38f4c0706607fd775a20d 100644 (file)
@@ -1,5 +1,5 @@
 Symbol table '\.dynsym' contains [0-9]+ entries:
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
 #...
- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +LOCAL +DEFAULT +[0-9]+ +foo
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +LOCAL +DEFAULT +[0-9]+ +_?foo
 #...
index 44a11cea2b7082f30efc91c03b882bdefc31c3a5..2d832dbe1e911a9384e38f4c0706607fd775a20d 100644 (file)
@@ -1,5 +1,5 @@
 Symbol table '\.dynsym' contains [0-9]+ entries:
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
 #...
- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +LOCAL +DEFAULT +[0-9]+ +foo
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +LOCAL +DEFAULT +[0-9]+ +_?foo
 #...
diff --git a/ld/testsuite/ld-elfvers/vers.h b/ld/testsuite/ld-elfvers/vers.h
new file mode 100644 (file)
index 0000000..4455527
--- /dev/null
@@ -0,0 +1,9 @@
+/* Add the symbol prefix to the symbol as needed.
+   Usage: SYMPFX(foo);  */
+#define __SYMPFX(pfx, sym) #pfx sym
+#define _SYMPFX(pfx, sym) __SYMPFX(pfx, sym)
+#define SYMPFX(sym) _SYMPFX(__USER_LABEL_PREFIX__, #sym)
+
+/* Generate a .symver reference with symbol prefixes.
+   Usage: SYMVER(foo, foobar@ver);  */
+#define SYMVER(name, name2) __asm__(".symver " SYMPFX(name) "," SYMPFX(name2))
index c27bc3bce7e74dfe5092564b0c6c5364a5b932f9..86e2bd2ba16157a3014fd822055c185a5eee800c 100644 (file)
@@ -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
index d33ab2007de914a5643f89ba2471bdd252cd80d8..9d1975288c7cd4bc62b831412b800dddbb019597 100644 (file)
@@ -1,9 +1,9 @@
 0+ g +DO \*ABS\*       0+ +VERS_1\.1 +VERS_1\.1
 0+ g +DO \*ABS\*       0+ +VERS_1\.2 +VERS_1\.2
 0+ g +DO \*ABS\*       0+ +VERS_2\.0 +VERS_2\.0
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(Base\) +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(VERS_1\.1\) +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(VERS_1\.2\) +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ g +DO (\.s?data|\*ABS\*)     [0-9a-f]+ +VERS_2\.0 +show_bar1
-[0-9a-f]+ g +DO (\.s?data|\*ABS\*)     [0-9a-f]+ +VERS_2\.0 +show_bar2
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(Base\) +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(VERS_1\.1\) +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(VERS_1\.2\) +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ g +DO (\.s?data|\*ABS\*)     [0-9a-f]+ +VERS_2\.0 +_?show_bar1
+[0-9a-f]+ g +DO (\.s?data|\*ABS\*)     [0-9a-f]+ +VERS_2\.0 +_?show_bar2
index ed589e83d705e148a6b50b83ac60fff27daa3f32..f2bb9db2a4eaace89066c22fd6e7d71d481214b6 100644 (file)
@@ -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_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|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@
+[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|opd)    [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@@VERS_2\.0
index 4e22cac092aac1bacba517f2f95d8be649993bd0..2457d29755596ee0a7abb79aa7024acdfe7d739f 100644 (file)
@@ -3,6 +3,7 @@
  * that we always get the right one.
  */
 #include <stdio.h>
+#include "vers.h"
 
 int
 foo_1()
@@ -31,6 +32,6 @@ main()
   return 0;
 }
 
-__asm__(".symver foo_1,show_foo@");
-__asm__(".symver foo_2,show_foo@VERS_1.1");
-__asm__(".symver foo_3,show_foo@@VERS_1.2");
+SYMVER(foo_1, show_foo@);
+SYMVER(foo_2, show_foo@VERS_1.1);
+SYMVER(foo_3, show_foo@@VERS_1.2);
index fc4c9962ea5ba54a1af63cb0dc812f53d99dd516..750c35832ab979971617be7de472089c753d0054 100644 (file)
@@ -1,5 +1,5 @@
 0+ g +DO \*ABS\*       0+ +VERS_1\.1 +VERS_1\.1
 0+ g +DO \*ABS\*       0+ +VERS_1\.2 +VERS_1\.2
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(Base\) +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(VERS_1\.1\) +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_1\.2 +(0x[0-9a-f]+ )?show_foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(Base\) +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(VERS_1\.1\) +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_1\.2 +(0x[0-9a-f]+ )?_?show_foo
index ba9f83e19128de20075c555552d163fedd0451f0..a642c9dbabcec6f9610383ed39a3ee8c44698d35 100644 (file)
@@ -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\.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|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\.1
+[0-9a-f]+ g +F \.(text|opd)    [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@@VERS_1\.2
index 6733ece6deff0463c304997f0e7e0a2ef54f8fdc..8ee491879249dd2a24e01af9753c42916142d9e8 100644 (file)
@@ -1,2 +1,2 @@
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+( +Base +)? (0x[0-9a-f]+ )?show_bar
-[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +(0x[0-9a-f]+ )?show_foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+( +Base +)? (0x[0-9a-f]+ )?_?show_bar
+[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +(0x[0-9a-f]+ )?_?show_foo
index aaca9f5e3323c3a228a012a4a35f485bd0e1eee7..c38d71aea9e2a795eee1433d5e6453677f420e8c 100644 (file)
@@ -1,3 +1,3 @@
 [0-9a-f]+ g +DO (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_1\.1 +VERS_1\.1
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_1\.1 +(0x[0-9a-f]+ )?show_bar
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +Base +(0x[0-9a-f]+ )?show_foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_1\.1 +(0x[0-9a-f]+ )?_?show_bar
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +Base +(0x[0-9a-f]+ )?_?show_foo
index 98106593c9f2477980c9a1276af34e9cc3f898c2..4cbb334dc0d66b9ad58dd83691170f5db24036d6 100644 (file)
@@ -1,2 +1,2 @@
 0+ g +DO \*ABS\*       0+ +VERS_2\.0 +VERS_2\.0
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?show_foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?_?show_foo
index 25dcc25999c5f502f53019a1137f293b829d4de9..9965b88a02954172373ff151044ec17b26712de9 100644 (file)
@@ -1,3 +1,5 @@
+#include "vers.h"
+
 int
 bar ()
 {
@@ -36,7 +38,7 @@ hide_new_foo ()
   return 1000 + bar ();
 }
 
-__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);
index 49bd7b2b356c37f8053bbe5c1244c3019a539ba0..38071cb456db55df6b524eea16b8f132a6c59377 100644 (file)
@@ -1,7 +1,7 @@
 0+ g +DO \*ABS\*       0+ +VERS_1\.1 +VERS_1\.1
 0+ g +DO \*ABS\*       0+ +VERS_1\.2 +VERS_1\.2
 0+ g +DO \*ABS\*       0+ +VERS_2\.0 +VERS_2\.0
-[0-9a-f]+ +w +DF (\.text|\.opd|\*ABS\*)        [0-9a-f]+ \(Base\) +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ +w +DF (\.text|\.opd|\*ABS\*)        [0-9a-f]+ \(VERS_1\.1\) +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ +w +DF (\.text|\.opd|\*ABS\*)        [0-9a-f]+ \(VERS_1\.2\) +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ +w +DF (\.text|\.opd|\*ABS\*)        [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?show_foo
+[0-9a-f]+ +w +DF (\.text|\.opd|\*ABS\*)        [0-9a-f]+ \(Base\) +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +w +DF (\.text|\.opd|\*ABS\*)        [0-9a-f]+ \(VERS_1\.1\) +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +w +DF (\.text|\.opd|\*ABS\*)        [0-9a-f]+ \(VERS_1\.2\) +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +w +DF (\.text|\.opd|\*ABS\*)        [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?_?show_foo
index bcc88820da779ce994c299b5b153dce6531c4f99..0b1183ccfd888888ed13d127ecd34325b2402f3e 100644 (file)
@@ -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_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|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@
+[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|opd)   [0-9a-f]+ (0x[0-9a-f]+ )?_?show_foo@@VERS_2\.0
index 7396deeca5f691963c0db54f486014b7157eb458..a77f94901277f8aa7aa1394317b0cd46d3869498 100644 (file)
@@ -1 +1 @@
-[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?show_foo
+[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?_?show_foo
index 63f15db45f5745aa41ff922a41b9367e1d8e1bc2..30ba91b82b492910a5893bcdf5424312176eb4c1 100644 (file)
@@ -1,3 +1,3 @@
-[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?show_foo
+[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?_?show_foo
 0+ g +DO \*ABS\*       0+ +VERS_XXX_1\.1 VERS_XXX_1\.1
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_XXX_1\.1 (0x[0-9a-f]+ )?show_xyzzy
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_XXX_1\.1 (0x[0-9a-f]+ )?_?show_xyzzy
index 559170c1b0c8ee0f34dd9426aa1416b9d4c62a31..fc13955b8d7faf28af5e02ad6526b13655a119e1 100644 (file)
@@ -1,2 +1,2 @@
 0+[    ]+g[    ]+DO[   ]+\*ABS\*[      ]+0+[   ]+VERS_1\.1[    ]+VERS_1\.1
-[0-9a-f]+[     ]+g[    ]+DO[   ]+\.s?bss[      ]+[0-9a-f]+[    ]+VERS_1\.1[    ]+show_foo
+[0-9a-f]+[     ]+g[    ]+DO[   ]+\.s?bss[      ]+[0-9a-f]+[    ]+VERS_1\.1[    ]+_?show_foo
index 2879c7f0e3d94c7c06688908c59ededfb4338fb0..3a75b48add1707214f785ca179dcdcda389420b9 100644 (file)
@@ -1,7 +1,9 @@
-__asm__(".symver _old_foo,foo@VERS.0");
-__asm__(".symver _old_bar,bar@VERS.0");
-__asm__(".symver _old_foobar,foobar@VERS.0");
-__asm__(".weak  _old_bar");
+#include "vers.h"
+
+SYMVER(_old_foo, foo@VERS.0);
+SYMVER(_old_bar, bar@VERS.0);
+SYMVER(_old_foobar, foobar@VERS.0);
+__asm__(".weak " SYMPFX(_old_bar));
 
 int
 bar () 
index 4cb21882c2582e3b27c300fbccd8c22bab31dbd6..7800a0c34992509017816b41c4c78d7af5d5328d 100644 (file)
@@ -1,4 +1,4 @@
 0+[    ]+g[    ]+DO[   ]+\*ABS\*[      ]+0+[   ]+VERS\.0[      ]+VERS\.0
-[0-9a-f]+[     ]+w[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+(0x[0-9a-f]+|)[       ]*bar
-[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+(0x[0-9a-f]+|)[       ]*foo
-[0-9a-f]+[     ]+g[    ]+DO[   ]+\.s?data[     ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+foobar
+[0-9a-f]+[     ]+w[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+(0x[0-9a-f]+|)[       ]*_?bar
+[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+(0x[0-9a-f]+|)[       ]*_?foo
+[0-9a-f]+[     ]+g[    ]+DO[   ]+\.s?data[     ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+_?foobar
index e7de74f4872fa4d66cc0f6d7091465f242007f0b..e2b2038e321cda4ea797965dc3006efbb2382102 100644 (file)
@@ -1,3 +1,3 @@
-[0-9a-f]+[     ]+g[    ]+O[    ]+\.s?data[     ]+[0-9a-f]+ (0x[0-9a-f]+ )?foobar@VERS\.0
-[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|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
index 5dfa465b90dc88e7cce2ee57621a43001846cfcc..db2aeec4bc329c959ef025b24d0ef9c0f03f3921 100644 (file)
@@ -1 +1 @@
-[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS\.0 +(0x[0-9a-f]+ )?bar
+[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS\.0 +(0x[0-9a-f]+ )?_?bar
index 288c82093e31f778535e267b7e4c2d74d2042752..bc5777bb83c50bc1bdf79881c2fe87e38be066f4 100644 (file)
@@ -1,4 +1,6 @@
-__asm__(".symver _old_bar,bar@VERS.0");
+#include "vers.h"
+
+SYMVER(_old_bar, bar@VERS.0);
 
 void
 _old_bar () 
index af06123386693a554835214925024ee7463f72b5..0c8d0278279f46ea44a7b9fc7662f7762d913d0a 100644 (file)
@@ -1,2 +1,2 @@
 0+[    ]+g[    ]+DO[   ]+\*ABS\*[      ]+0+[   ]+VERS\.0[      ]+VERS\.0
-[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+(0x[0-9a-f]+ )?bar
+[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+(0x[0-9a-f]+ )?_?bar
index ff0770875327d32ec751fef8bd544291004febc1..c3f4150ccaa4797060a2cddd1b7041f5aa182cac 100644 (file)
@@ -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|opd)[         ]+[0-9a-f]+ (0x[0-9a-f]+ )?_?bar@VERS.0
index 88c31b303f16142b9e65ba10e1efe244a2d44844..47f0606a81b929579e1cd394644e846998415228 100644 (file)
@@ -1,2 +1,2 @@
 0+[    ]+g[    ]+DO[   ]+\*ABS\*[      ]+0+[   ]+VERS\.0[      ]+VERS\.0
-[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?bar
+[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?_?bar
index 8c85a4ae9f540b931c924fd4314a3289aa7c9238..dfd6a3321ad051ba5311aa99c1be05bf98a7a892 100644 (file)
@@ -1 +1 @@
-[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS\.0 +(0x[0-9a-f]+ )?foo
+[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS\.0 +(0x[0-9a-f]+ )?_?foo
index 250d6f9eefae05181e7ccea8bda0f5a7c1a3be0f..13c8edd6e3506c7170fb623061f69c93b02ee505 100644 (file)
@@ -1,4 +1,6 @@
-__asm__(".symver _old_bar,bar@VERS.0");
+#include "vers.h"
+
+SYMVER(_old_bar, bar@VERS.0);
 
 void
 _old_bar (void) 
index 4450665ff923673f2702a4f3d5c812eda984ba8d..04385b002d4f0201a4da8b948047bff309c89634 100644 (file)
@@ -1,3 +1,3 @@
 0+[    ]+g[    ]+DO[   ]+\*ABS\*[      ]+0+[   ]+VERS\.0[      ]+VERS\.0
-[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+(0x[0-9a-f]+ )?bar
-[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?foo
+[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+(0x[0-9a-f]+ )?_?bar
+[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?_?foo
index ff0770875327d32ec751fef8bd544291004febc1..c3f4150ccaa4797060a2cddd1b7041f5aa182cac 100644 (file)
@@ -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|opd)[         ]+[0-9a-f]+ (0x[0-9a-f]+ )?_?bar@VERS.0
index 88c31b303f16142b9e65ba10e1efe244a2d44844..47f0606a81b929579e1cd394644e846998415228 100644 (file)
@@ -1,2 +1,2 @@
 0+[    ]+g[    ]+DO[   ]+\*ABS\*[      ]+0+[   ]+VERS\.0[      ]+VERS\.0
-[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?bar
+[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?_?bar
index b31b82b05a166d91fbce864af981bc0dd0fcb376..ab5fbd834e7680f7be060f8e672a88f17b1c97ff 100644 (file)
@@ -1,2 +1,2 @@
-[0-9a-f]*      DF \*UND\*      [0-9a-f]*  VERS.0      (0x[0-9a-f][0-9a-f] )?bar
-[0-9a-f]*      DF \*UND\*      [0-9a-f]*  VERS.0      (0x[0-9a-f][0-9a-f] )?foo
+[0-9a-f]*      DF \*UND\*      [0-9a-f]*  VERS.0      (0x[0-9a-f][0-9a-f] )?_?bar
+[0-9a-f]*      DF \*UND\*      [0-9a-f]*  VERS.0      (0x[0-9a-f][0-9a-f] )?_?foo
index e5b55b169be02317b8465d0a48ffc53ebc696f03..42e81e42d9c05d66eb7283a1da9f783c6b43721c 100644 (file)
@@ -1,15 +1,15 @@
 Relocation section .*
 # Ensure there is a dynamic relocation against x
 #...
-[0-9a-f]+ +[0-9a-f]+ R_.* +x(| \+ 0)
+[0-9a-f]+ +[0-9a-f]+ R_.* +_?x(| \+ 0)
 #...
 Symbol table '.dynsym' contains [0-9]+ entries:
 # And ensure the dynamic symbol table contains at least x@VERS.0
 # and foo@@VERS.0 symbols
 #...
- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ x|[0-9]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ foo@)@VERS\.0
+ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ _?foo@)@VERS\.0
 #...
- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ x|[0-9]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ foo@)@VERS\.0
+ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ _?foo@)@VERS\.0
 #...
 Symbol table '.symtab' contains [0-9]+ entries:
 #pass
index 7fef8d8a7661fa6405b769e216e8b5d6ef57ea98..10073d436348172d7531499b9ee9eabb19503d74 100644 (file)
@@ -1,5 +1,7 @@
 /* Test whether .symver x, x@foo
    causes relocations against x within the same shared library
    to become dynamic relocations against x@foo.  */
+#include "vers.h"
+
 int x = 12;
-__asm__ (".symver x, x@VERS.0");
+SYMVER(x, x@VERS.0);
index 267c4243b566a3206266023191ce637720f658b2..6e69b334ba1d94f9a02f58f74bdc3ceba097f17c 100644 (file)
@@ -1,8 +1,10 @@
 /* Test whether .symver x, x@foo
    causes relocations against x within the same shared library
    to become dynamic relocations against x@foo.  */
+#include "vers.h"
+
 int x = 12;
-__asm__ (".symver x, x@VERS.0");
+SYMVER(x, x@VERS.0);
 void foo (void)
 {
   x = 24;
index 6e6573acacba24257a736a8b3e830c7d0a610740..51fa8f15374abfd135a5c780d083ce152ae69cf0 100644 (file)
@@ -1,2 +1,2 @@
 0+[    ]+g[    ]+DO[   ]+\*ABS\*[      ]+0+[   ]+VERS\.0[      ]+VERS\.0
-[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?foo
+[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?_foo
index 6e6573acacba24257a736a8b3e830c7d0a610740..a9d0313952f106c34624653ed7e45f4367d6c7a0 100644 (file)
@@ -1,2 +1,2 @@
 0+[    ]+g[    ]+DO[   ]+\*ABS\*[      ]+0+[   ]+VERS\.0[      ]+VERS\.0
-[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?foo
+[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?_?foo
index 6e6573acacba24257a736a8b3e830c7d0a610740..a9d0313952f106c34624653ed7e45f4367d6c7a0 100644 (file)
@@ -1,2 +1,2 @@
 0+[    ]+g[    ]+DO[   ]+\*ABS\*[      ]+0+[   ]+VERS\.0[      ]+VERS\.0
-[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?foo
+[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?_?foo
index 7b164c480b820d003b756405f8de9d8ab53368b4..3fe5615baa4f186397b15560bb13e30ef601a349 100644 (file)
@@ -1,2 +1,3 @@
+#include "vers.h"
 void foo () {}
-asm (".hidden foo");
+asm (".hidden " SYMPFX(foo));
index 58b56e85227b9532bac797d65ee89226d4bac3dc..c585799effb7eb6155c7dbe785e031e7fde062ce 100644 (file)
@@ -1,2 +1,2 @@
 0+[    ]+g[    ]+DO[   ]+\*ABS\*[      ]+0+[   ]+VERS\.0[      ]+VERS\.0
-[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+(0x[0-9a-f]+ )?foo
+[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+\(VERS\.0\)[  ]+(0x[0-9a-f]+ )?_?foo
index d4946f5e2055026f51ea66a9d1d06fe70ed1b43c..d20bd1d23497859483eb1e2f0bba7472d47f7a29 100644 (file)
@@ -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|opd)[         ]+[0-9a-f]+ (0x[0-9a-f]+ )?_?foo@VERS\.0
index 3fc60b04bcd7b7ff751ab679ad3e6b6b3f3683f1..107e1c1de89b24bfcc75add0e7e6c128c23e4cd9 100644 (file)
@@ -1,6 +1,8 @@
+#include "vers.h"
+
 void
 foo ()
 {
 }
 
-asm (".symver foo,foo@VERS.0");
+SYMVER(foo, foo@VERS.0);
index 8c85a4ae9f540b931c924fd4314a3289aa7c9238..dfd6a3321ad051ba5311aa99c1be05bf98a7a892 100644 (file)
@@ -1 +1 @@
-[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS\.0 +(0x[0-9a-f]+ )?foo
+[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS\.0 +(0x[0-9a-f]+ )?_?foo
index 750ee8809c79286c05280e3ad16bf5753b7b56d4..6c35c9be7078d3d8a4c7c848d1103c9179f2f84e 100644 (file)
@@ -1,2 +1,2 @@
 0+[    ]+g[    ]+DO[   ]+\*ABS\*[      ]+0+[   ]+VERS\.0[      ]+VERS\.0
-[0-9a-f]+[     ]+w[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?foo
+[0-9a-f]+[     ]+w[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?_?foo
index 99f6d881f83c52e2059092d2d7527fa52f9a90b5..7ad56789eeae1819b8ddc5ef599e4cd5f5c3b954 100644 (file)
@@ -1 +1 @@
-[0-9a-f]+[     ]+DF[   ]+\*UND\*[      ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?foo
+[0-9a-f]+[     ]+DF[   ]+\*UND\*[      ]+[0-9a-f]+[    ]+VERS\.0[      ]+(0x[0-9a-f]+ )?_?foo
index ed8a230de086dfb4f0e61e0c790ee8cd86121b71..f983d43477ea5cf15be695d30573e20da48a4d06 100644 (file)
@@ -1 +1 @@
-[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+vers29\.so[   ]+(0x[0-9a-f]+ )?show
+[0-9a-f]+[     ]+g[    ]+DF[   ]+\.(text|opd)[ ]+[0-9a-f]+[    ]+vers29\.so[   ]+(0x[0-9a-f]+ )?_?show
index 7396deeca5f691963c0db54f486014b7157eb458..a77f94901277f8aa7aa1394317b0cd46d3869498 100644 (file)
@@ -1 +1 @@
-[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?show_foo
+[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?_?show_foo
index ddb21eb38b0c73f52f75c2ae4d0e895891b3f7e3..5762f01843ccf6d31d7bef5287320a68e8ca975f 100644 (file)
@@ -1,5 +1,5 @@
 0+ g    DO \*ABS\*     0+  VERS_30\.0   VERS_30\.0
-[0-9a-f]+ g    DF (\.text|\.opd|\*ABS\*)       [0-9a-f]+  VERS_30\.0   global
-[0-9a-f]+ g    DF (\.text|\.opd|\*ABS\*)       [0-9a-f]+  VERS_30\.0   foo
-[0-9a-f]+ g    DF (\.text|\.opd|\*ABS\*)       [0-9a-f]+  VERS_30\.0   info
-[0-9a-f]+ g    DF (\.text|\.opd|\*ABS\*)       [0-9a-f]+  VERS_30\.0   extern
+[0-9a-f]+ g    DF (\.text|\.opd|\*ABS\*)       [0-9a-f]+  VERS_30\.0   _?global
+[0-9a-f]+ g    DF (\.text|\.opd|\*ABS\*)       [0-9a-f]+  VERS_30\.0   _?foo
+[0-9a-f]+ g    DF (\.text|\.opd|\*ABS\*)       [0-9a-f]+  VERS_30\.0   _?info
+[0-9a-f]+ g    DF (\.text|\.opd|\*ABS\*)       [0-9a-f]+  VERS_30\.0   _?extern
index 72dec06aff251ac2cc1fe01a1590bd3cefde3106..fb22f5b87ca35c204a2b5f328ad1e9f496a1fb6b 100644 (file)
@@ -1,2 +1,2 @@
 0+ g +DO \*ABS\*       0+ +VERS_31\.0 +VERS_31\.0
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_31\.0 +_Z1fIA3_icEvPT_T0
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_31\.0 +_?_Z1fIA3_icEvPT_T0
index 47d1b06bff9b4582fbd500b6f94ebdb5cbc885dd..24deae4987dc4c1dc4b0a1232a4d795cbf6ff9f4 100644 (file)
@@ -1,2 +1,2 @@
 0+ g +DO \*ABS\*       0+ +VERS_1 +VERS_1
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_1 +(0x[0-9a-f]+ )?foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_1 +(0x[0-9a-f]+ )?_?foo
index 88b34744722cfc4a2be7522fa8a9d4ef58099daf..a2fc578bba856494f11bd3851e01ea3d432f757f 100644 (file)
@@ -1,2 +1,2 @@
-[0-9a-f]+ g +D +\*ABS\*        [0-9a-f]+ +VERS_1 +(0x[0-9a-f]+ )?foo
+[0-9a-f]+ g +D +\*ABS\*        [0-9a-f]+ +VERS_1 +(0x[0-9a-f]+ )?_?foo
 0+ g +DO \*ABS\*       0+ +VERS_1 +VERS_1
index 453f2eb4d9c951f98dfa67e7567ade524197fed7..46ac43258de86a8fa9ba4994d6ea7ed0e70b2cdc 100644 (file)
@@ -5,6 +5,7 @@
  * -export-dynamic.
  */
 #include <stdio.h>
+#include "vers.h"
 
 extern int foo ();
 
@@ -21,7 +22,7 @@ new_foo()
 
 }
 
-__asm__(".symver new_foo,foo@@VERS_2.0");
+SYMVER(new_foo, foo@@VERS_2.0);
 
 int
 main()
index 395e69910bbd22c911e903a11b9c747bdbba1620..c48d1bb09f1038fb902b889e1bc248e5a44314f4 100644 (file)
@@ -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|opd)    [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@@VERS_2\.0
index a7efb0aef61c390e177d124e949ceab2c2ab9dcd..96dfea8a976c53611990ae52ec27209be250d1a2 100644 (file)
@@ -1,2 +1,2 @@
 0+ g    DO \*ABS\*     0+  VERS_2\.0    VERS_2\.0
-[0-9a-f]+ g    DF (\.text|\.opd|\*ABS\*)       [0-9a-f]+  VERS_2\.0    (0x[0-9a-f]+ )?foo
+[0-9a-f]+ g    DF (\.text|\.opd|\*ABS\*)       [0-9a-f]+  VERS_2\.0    (0x[0-9a-f]+ )?_?foo
index 395e69910bbd22c911e903a11b9c747bdbba1620..c48d1bb09f1038fb902b889e1bc248e5a44314f4 100644 (file)
@@ -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|opd)    [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@@VERS_2\.0
index cc6ea40b6784dede48e99f3d876854f3cae62598..3cae67ebc924f6b23ee5d373a3bcc38ed572ae97 100644 (file)
@@ -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 ()
index 9e48df9b4009588b5100b8baefec114625280337..cb1c93f635a18e664166f4697bac0a916c1c2201 100644 (file)
@@ -3,6 +3,7 @@
  * that we always get the right one.
  */
 #include <stdio.h>
+#include "vers.h"
 
 extern int foo_1();
 extern int foo_2();
@@ -19,7 +20,7 @@ main()
   return 0;
 }
 
-__asm__(".symver foo_1,show_foo@");
-__asm__(".symver foo_2,show_foo@VERS_1.1");
-__asm__(".symver foo_3,show_foo@VERS_1.2");
-__asm__(".symver foo_4,show_foo@VERS_2.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);
index 79e9061a92bd21c5c404b9561a2c22a1caf84045..a53099bbedb4d19c79d69be74cd80505577a3f78 100644 (file)
@@ -1,4 +1,4 @@
-[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_2.0 +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_1.2 +(0x[0-9a-f]+ )?show_foo
-[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_1.1 +(0x[0-9a-f]+ )?show_foo
+[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_2.0 +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_1.2 +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +DF \*UND\*  [0-9a-f]+ +VERS_1.1 +(0x[0-9a-f]+ )?_?show_foo
index 801f7b3618aae78134914259afcfb5c32bf10648..ae68d724e201fb82b0a00e5017d9267a19662660 100644 (file)
@@ -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
index 7bee8c70bfe3707ce7235cccad4aef5d1a795b98..f3d2a2d989706ae51091457b9db5c96d29929123 100644 (file)
@@ -2,6 +2,8 @@
  * Test supplied by Ulrich.  Verify that we can correctly force 'a'
  * to local scope.
  */
+#include "vers.h"
+
 int
 __a_internal (int e)
 {
@@ -14,5 +16,5 @@ __b_internal (int e)
   return e + 42;
 }
 
-asm (".symver __a_internal,hide_a@@VERS_1");
-asm (".symver __b_internal,show_b@@VERS_1");
+SYMVER(__a_internal, hide_a@@VERS_1);
+SYMVER(__b_internal, show_b@@VERS_1);
index 8434925f6749ac70cef523ad2dc96c61b48b57dc..89a45a54308669c512d7e680755ce16299d055db 100644 (file)
@@ -1,2 +1,2 @@
 0+ g +DO \*ABS\*       0+ +VERS_1 +VERS_1
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_1 +(0x[0-9a-f]+ )?show_b
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_1 +(0x[0-9a-f]+ )?_?show_b
index 94d9312bd4dc93bd543bb25732ae7696b4820486..ef8d04be0bbc28c81b0fd394b59d656dca992b4b 100644 (file)
@@ -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|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
index bef1402d2699657dabc7cb8697bac5d807a4b9f1..50793640915f98fb51c9b31b7a6a6050b0d4b5c0 100644 (file)
@@ -2,6 +2,8 @@
  * Testcase to verify that reference to foo@BAR and a definition of foo@@BAR
  * are not treated as a multiple def.
  */
+#include "vers.h"
+
 const char * bar1 = "asdf";
 const char * bar2 = "asdf";
 
@@ -41,7 +43,7 @@ main()
   return 0;
 }
 
-__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);
index 5443e67dd0b680992ccfd1e2f0bae5cbb7b71903..411451a28b353fc6eeab08096804ecb5ae211539 100644 (file)
@@ -1,4 +1,4 @@
 0+ g +DO \*ABS\*       0+ +VERS_1\.1 +VERS_1\.1
 0+ g +DO \*ABS\*       0+ +VERS_1\.2 +VERS_1\.2
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(VERS_1\.1\) +(0x[0-9a-f]+ )?foo
-[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_1\.2 +(0x[0-9a-f]+ )?foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ \(VERS_1\.1\) +(0x[0-9a-f]+ )?_?foo
+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+ +VERS_1\.2 +(0x[0-9a-f]+ )?_?foo
index 6d6585fd6ce99b20de4989fe98a6d85c05c8d8f5..be0e6ddb2003d16beb1d99976ce2e7f23e0448fb 100644 (file)
@@ -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\.1
-[0-9a-f]+ g +F \.(text|opd)    [0-9a-f]+ (0x[0-9a-f]+ )?foo@@VERS_1\.2
+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\.1
+[0-9a-f]+ g +F \.(text|opd)    [0-9a-f]+ (0x[0-9a-f]+ )?_?foo@@VERS_1\.2
This page took 0.080432 seconds and 4 git commands to generate.