aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r--ld/testsuite/ld-elf/pr26302.nd3
-rw-r--r--ld/testsuite/ld-elf/pr26302.ver5
-rw-r--r--ld/testsuite/ld-elf/pr26302a.c4
-rw-r--r--ld/testsuite/ld-elf/pr26302b.c7
-rw-r--r--ld/testsuite/ld-elf/shared.exp18
5 files changed, 37 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/pr26302.nd b/ld/testsuite/ld-elf/pr26302.nd
new file mode 100644
index 00000000000..1f2fbdf9a3f
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr26302.nd
@@ -0,0 +1,3 @@
+#...
+ +U foo@@FOO
+#pass
diff --git a/ld/testsuite/ld-elf/pr26302.ver b/ld/testsuite/ld-elf/pr26302.ver
new file mode 100644
index 00000000000..f2c03ac7a13
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr26302.ver
@@ -0,0 +1,5 @@
+FOO
+{
+global:
+ foo;
+};
diff --git a/ld/testsuite/ld-elf/pr26302a.c b/ld/testsuite/ld-elf/pr26302a.c
new file mode 100644
index 00000000000..cd0130cacdf
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr26302a.c
@@ -0,0 +1,4 @@
+void
+foo (void)
+{
+}
diff --git a/ld/testsuite/ld-elf/pr26302b.c b/ld/testsuite/ld-elf/pr26302b.c
new file mode 100644
index 00000000000..eae278df96d
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr26302b.c
@@ -0,0 +1,7 @@
+extern void foo (void);
+
+void
+bar (void)
+{
+ foo ();
+}
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index e9e90120586..014937175fc 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -843,6 +843,24 @@ run_cc_link_tests [list \
{{readelf {--dyn-syms --wide} pr26094-1b.rd}} \
"pr26094-1" \
] \
+ [list \
+ "Build pr26302a.so" \
+ "-shared -Wl,--version-script=pr26302.ver" \
+ "-fPIC" \
+ {pr26302a.c} \
+ {} \
+ "pr26302a.so"
+ ] \
+ [list \
+ "Build pr26302b.so" \
+ "-shared -Wl,--no-as-needed tmpdir/pr26302a.so" \
+ "-fPIC" \
+ {pr26302b.c} \
+ {{nm {-u} pr26302.nd} \
+ {nm {-u -D} pr26302.nd} \
+ {nm {-u -D --with-symbol-versions} pr26302.nd}} \
+ "pr26302b.so" \
+ ] \
]
run_ld_link_tests [list \