* ld-elfvers/vers.exp: Add vers21.
* ld-elfvers/vers21.c: New.
* ld-elfvers/vers21.dsym: New.
* ld-elfvers/vers21.map: New.
* ld-elfvers/vers21.sym: New.
* ld-elfvers/vers21.ver: New.
+2002-07-15 H.J. Lu <hjl@gnu.org>
+
+ * ld-elfvers/vers.exp: Add vers21.
+
+ * ld-elfvers/vers21.c: New.
+ * ld-elfvers/vers21.dsym: New.
+ * ld-elfvers/vers21.map: New.
+ * ld-elfvers/vers21.sym: New.
+ * ld-elfvers/vers21.ver: New.
+
2002-07-12 Hans-Peter Nilsson <hp@axis.com>
* ld-cris/nodyn4.d, ld-cris/expdyn4.d, ld-cris/comref1.s,
build_vers_lib "vers20a" vers20.c vers20a "" vers20.map vers20a.ver vers20.dsym ""
exec cp $tmpdir/vers20a.so $tmpdir/vers20b.so
build_vers_lib "vers20" vers20.c vers20 "vers20a.so vers20b.so" vers20.map vers20.ver vers20.dsym ""
+
+# Test .symver override.
+build_vers_lib "vers21" vers21.c vers21 "" vers21.map vers21.ver vers21.dsym vers21.sym
--- /dev/null
+__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");
+
+int
+bar ()
+{
+ return 1;
+}
+
+int
+_old_bar ()
+{
+ return bar ();
+}
+
+int
+foo ()
+{
+ return 2;
+}
+
+int
+_old_foo ()
+{
+ return foo ();
+}
+
+int _old_foobar = 0;
+
+int foobar = 1;
--- /dev/null
+[0]*[ ]+g[ ]+DO[ ]+\*ABS\*[ ]+[0]*[ ]+VERS.0[ ]+VERS.0
+[0-9a-f]*[ ]+w[ ]+DF[ ]+.text[ ]+[0-9a-f]*[ ]+\(VERS.0\)[ ]+(0x[0-9a-f]*|)[ ]*bar
+[0-9a-f]*[ ]+g[ ]+DF[ ]+.text[ ]+[0-9a-f]*[ ]+\(VERS.0\)[ ]+(0x[0-9a-f]*|)[ ]*foo
+[0-9a-f]*[ ]+g[ ]+DO[ ]+.s?data[ ]+[0-9a-f]*[ ]+\(VERS.0\)[ ]+foobar
--- /dev/null
+VERS.0 {
+ global:
+ bar;
+ foo;
+ foobar;
+ local:
+ *;
+};
--- /dev/null
+[0-9a-f]*[ ]+g[ ]+O[ ]+.s?data[ ]+[0-9a-f]* (0x[0-9a-f][0-9a-f] )?foobar@VERS.0
+[0-9a-f]*[ ]+w[ ]+F[ ]+.text[ ]+[0-9a-f]* (0x[0-9a-f][0-9a-f] )?bar@VERS.0
+[0-9a-f]*[ ]+g[ ]+F[ ]+.text[ ]+[0-9a-f]* (0x[0-9a-f][0-9a-f] )?foo@VERS.0
--- /dev/null
+Version definitions:
+1 0x01 0x0965595f vers21.so
+2 0x00 0x05aa7610 VERS.0
+