summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ld-plugin/lto.exp9
-rw-r--r--ld/testsuite/ld-plugin/pr30281.c4
-rw-r--r--ld/testsuite/ld-plugin/pr30281.t4
3 files changed, 17 insertions, 0 deletions
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 98e811177ef..e7e7952bb1b 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -530,6 +530,15 @@ set lto_link_elf_tests [list \
{} \
"pr29086" \
] \
+ [list \
+ "Build pr30281.so" \
+ "-shared -Wl,--version-script,pr30281.t \
+ -O2 -fPIC -flto-partition=max -flto=2" \
+ "-O2 -fPIC -flto-partition=max -flto=2" \
+ {pr30281.c} \
+ "" \
+ "pr30281.so" \
+ ] \
]
# PR 14918 checks that libgcc is not spuriously included in a shared link of
diff --git a/ld/testsuite/ld-plugin/pr30281.c b/ld/testsuite/ld-plugin/pr30281.c
new file mode 100644
index 00000000000..ba9722a389c
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr30281.c
@@ -0,0 +1,4 @@
+extern __inline __attribute__((__gnu_inline__)) void foo(void) {}
+__attribute__((__symver__("foo@GLIBC_2.2.5")))
+int __collector_foo_2_2(void) {}
+void foo(void) {}
diff --git a/ld/testsuite/ld-plugin/pr30281.t b/ld/testsuite/ld-plugin/pr30281.t
new file mode 100644
index 00000000000..3169ad398c9
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr30281.t
@@ -0,0 +1,4 @@
+GLIBC_2.2.5 {
+ global:
+ foo;
+};