aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/ver_test_pr31830.script
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-05-31 21:30:34 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-06-08 23:54:39 -0700
commit89d801850ac03d0531f7eef3d6978bec17a30a2d (patch)
tree7c8719feee02ca0df80571a765d46ce05394bd71 /gold/testsuite/ver_test_pr31830.script
parent2b05f934486de42f8200bf11cece21ae3bc284e6 (diff)
downloadbinutils-89d801850ac03d0531f7eef3d6978bec17a30a2d.zip
binutils-89d801850ac03d0531f7eef3d6978bec17a30a2d.tar.gz
binutils-89d801850ac03d0531f7eef3d6978bec17a30a2d.tar.bz2
gold: Properly remove the versioned symbol
When the versioned symbol foo is removed from the shared library, the ".symver foo,foo@VER" directive provides binary compatibility for foo@VER. In this case, the unversioned symbol foo should be hidden and shouldn't generate a multiple definition error. PR gold/31830 * resolve.cc (Symbol_table::resolve): Move symbol version handling to ... * symtab.cc (Symbol_table::add_from_object): Here. If the hidden version from .symver is the same as the default version from the unversioned symbol, don't make the unversioned symbol the default versioned symbol. * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_pr31830.sh. (check_DATA): ver_test_pr31830_a.syms and ver_test_pr31830_b.syms. (ver_test_pr31830_a.syms): New. (ver_test_pr31830_b.syms): Likewise. (ver_test_pr31830_a.so): Likewise. (ver_test_pr31830_b.so): Likewise. * testsuite/Makefile.in: Regenerated. * testsuite/ver_test_pr31830.script: New file. * testsuite/ver_test_pr31830.sh: Likewise. * testsuite/ver_test_pr31830_a.c: Likewise. * testsuite/ver_test_pr31830_b.c: Likewise. * testsuite/ver_test_pr31830_lto.c: Likewise. * testsuite/ver_test_pr31830_lto.sh: Likewise. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'gold/testsuite/ver_test_pr31830.script')
-rw-r--r--gold/testsuite/ver_test_pr31830.script6
1 files changed, 6 insertions, 0 deletions
diff --git a/gold/testsuite/ver_test_pr31830.script b/gold/testsuite/ver_test_pr31830.script
new file mode 100644
index 0000000..0dcc47f
--- /dev/null
+++ b/gold/testsuite/ver_test_pr31830.script
@@ -0,0 +1,6 @@
+GLIBC_2.2.5 {
+ global:
+ foo;
+ local:
+ *;
+};