aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfvers
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2002-07-16 00:15:57 +0000
committerH.J. Lu <hjl.tools@gmail.com>2002-07-16 00:15:57 +0000
commitb42d80615e5394c8c79704b26178bca15f047bd6 (patch)
tree68a86665390122e05a2c9651794e4342199750d2 /ld/testsuite/ld-elfvers
parent5e319c00582dd34384f3ff818844b4e9843c1eff (diff)
downloadgdb-b42d80615e5394c8c79704b26178bca15f047bd6.zip
gdb-b42d80615e5394c8c79704b26178bca15f047bd6.tar.gz
gdb-b42d80615e5394c8c79704b26178bca15f047bd6.tar.bz2
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.
Diffstat (limited to 'ld/testsuite/ld-elfvers')
-rw-r--r--ld/testsuite/ld-elfvers/vers.exp3
-rw-r--r--ld/testsuite/ld-elfvers/vers21.c32
-rw-r--r--ld/testsuite/ld-elfvers/vers21.dsym4
-rw-r--r--ld/testsuite/ld-elfvers/vers21.map8
-rw-r--r--ld/testsuite/ld-elfvers/vers21.sym3
-rw-r--r--ld/testsuite/ld-elfvers/vers21.ver4
6 files changed, 54 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp
index 48ba4ca..6381ea5 100644
--- a/ld/testsuite/ld-elfvers/vers.exp
+++ b/ld/testsuite/ld-elfvers/vers.exp
@@ -821,3 +821,6 @@ build_exec "vers19" vers19.c vers19 "-rpath ." vers18.so vers19.ver vers19.dsym
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
diff --git a/ld/testsuite/ld-elfvers/vers21.c b/ld/testsuite/ld-elfvers/vers21.c
new file mode 100644
index 0000000..23382af
--- /dev/null
+++ b/ld/testsuite/ld-elfvers/vers21.c
@@ -0,0 +1,32 @@
+__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;
diff --git a/ld/testsuite/ld-elfvers/vers21.dsym b/ld/testsuite/ld-elfvers/vers21.dsym
new file mode 100644
index 0000000..2096b5d
--- /dev/null
+++ b/ld/testsuite/ld-elfvers/vers21.dsym
@@ -0,0 +1,4 @@
+[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
diff --git a/ld/testsuite/ld-elfvers/vers21.map b/ld/testsuite/ld-elfvers/vers21.map
new file mode 100644
index 0000000..08f748a
--- /dev/null
+++ b/ld/testsuite/ld-elfvers/vers21.map
@@ -0,0 +1,8 @@
+VERS.0 {
+ global:
+ bar;
+ foo;
+ foobar;
+ local:
+ *;
+};
diff --git a/ld/testsuite/ld-elfvers/vers21.sym b/ld/testsuite/ld-elfvers/vers21.sym
new file mode 100644
index 0000000..bcb6359
--- /dev/null
+++ b/ld/testsuite/ld-elfvers/vers21.sym
@@ -0,0 +1,3 @@
+[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
diff --git a/ld/testsuite/ld-elfvers/vers21.ver b/ld/testsuite/ld-elfvers/vers21.ver
new file mode 100644
index 0000000..3ba24d8
--- /dev/null
+++ b/ld/testsuite/ld-elfvers/vers21.ver
@@ -0,0 +1,4 @@
+Version definitions:
+1 0x01 0x0965595f vers21.so
+2 0x00 0x05aa7610 VERS.0
+