aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfvers
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-08-17 10:08:30 +0000
committerJakub Jelinek <jakub@redhat.com>2005-08-17 10:08:30 +0000
commit96f8ade54630830d0707c22ae531d32baa3c9966 (patch)
treec70a4d1a88628eaba276c7dac39cde0d452b6f00 /ld/testsuite/ld-elfvers
parent8d1d654fb401245cefa690a03e61f56cf953999e (diff)
downloadgdb-96f8ade54630830d0707c22ae531d32baa3c9966.zip
gdb-96f8ade54630830d0707c22ae531d32baa3c9966.tar.gz
gdb-96f8ade54630830d0707c22ae531d32baa3c9966.tar.bz2
* ldgram.y (vers_defns): Don't lose pattern list before
extern NAME {}. Handle global, local and extern symbol names. ld/testsuite/ * ld-elfvers/vers.exp: Add a new test, vers30. * ld-elfvers/vers30.c: New file. * ld-elfvers/vers30.map: New file. * ld-elfvers/vers30.ver: New file. * ld-elfvers/vers30.dsym: New file.
Diffstat (limited to 'ld/testsuite/ld-elfvers')
-rw-r--r--ld/testsuite/ld-elfvers/vers.exp4
-rw-r--r--ld/testsuite/ld-elfvers/vers30.c7
-rw-r--r--ld/testsuite/ld-elfvers/vers30.dsym5
-rw-r--r--ld/testsuite/ld-elfvers/vers30.map6
-rw-r--r--ld/testsuite/ld-elfvers/vers30.ver4
5 files changed, 26 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp
index d67ce7b..bc11550 100644
--- a/ld/testsuite/ld-elfvers/vers.exp
+++ b/ld/testsuite/ld-elfvers/vers.exp
@@ -960,3 +960,7 @@ build_vers_lib_pic "vers28a" vers28a.c vers28a "" "" vers28a.ver vers28a.dsym ""
build_vers_lib_pic "vers28b" vers28b.c vers28b "" vers28b.map vers28b.ver vers28b.dsym ""
build_vers_lib_pic "vers28c" vers28c.c vers28c "vers28b.so vers28a.so" "" vers28c.ver vers28c.dsym ""
build_vers_lib_pic_flags "vers29" vers29.c vers29 "" "" vers29.ver vers29.dsym "" "--default-symver"
+
+# Test #30 - test handling of symbol names global, local and extern in the
+# version script.
+build_vers_lib_pic "vers30" vers30.c vers30 "" vers30.map vers30.ver vers30.dsym ""
diff --git a/ld/testsuite/ld-elfvers/vers30.c b/ld/testsuite/ld-elfvers/vers30.c
new file mode 100644
index 0000000..65dba2f
--- /dev/null
+++ b/ld/testsuite/ld-elfvers/vers30.c
@@ -0,0 +1,7 @@
+void global (void) {}
+void local (void) {}
+void foo (void) {}
+void bar (void) {}
+void info (void) {}
+void baz (void) __asm ("extern");
+void baz (void) {}
diff --git a/ld/testsuite/ld-elfvers/vers30.dsym b/ld/testsuite/ld-elfvers/vers30.dsym
new file mode 100644
index 0000000..1f358d4
--- /dev/null
+++ b/ld/testsuite/ld-elfvers/vers30.dsym
@@ -0,0 +1,5 @@
+[0]* g DO \*ABS\* [0]* VERS_30.0 VERS_30.0
+[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* VERS_30.0 global
+[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* VERS_30.0 foo
+[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* VERS_30.0 info
+[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* VERS_30.0 extern
diff --git a/ld/testsuite/ld-elfvers/vers30.map b/ld/testsuite/ld-elfvers/vers30.map
new file mode 100644
index 0000000..71d06d3
--- /dev/null
+++ b/ld/testsuite/ld-elfvers/vers30.map
@@ -0,0 +1,6 @@
+VERS_30.0 {
+ global:
+ foo; info; global; extern "C" { extern; };
+ local:
+ local; bar; *;
+};
diff --git a/ld/testsuite/ld-elfvers/vers30.ver b/ld/testsuite/ld-elfvers/vers30.ver
new file mode 100644
index 0000000..dfcf0da
--- /dev/null
+++ b/ld/testsuite/ld-elfvers/vers30.ver
@@ -0,0 +1,4 @@
+Version definitions:
+1 0x01 0x0966695f vers30.so
+2 0x00 0x079239b0 VERS_30.0
+