aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-08-22 08:31:53 -0700
committerAndreas K. Hüttel <dilfridge@gentoo.org>2021-01-23 20:25:30 +0200
commit30287f283ebfc960f60b0e9fa9459088059a47a3 (patch)
tree1ec087c37e8a700f600a706a49ee3efeaa6c8baf /ld/testsuite/ld-elf/shared.exp
parentnm: Remove --with-symbol-versions (diff)
downloadbinutils-gdb-30287f283ebfc960f60b0e9fa9459088059a47a3.tar.gz
binutils-gdb-30287f283ebfc960f60b0e9fa9459088059a47a3.tar.bz2
binutils-gdb-30287f283ebfc960f60b0e9fa9459088059a47a3.zip
elf: Keep only one '@' for undefined versioned symbols
The symbol string table in the .symtab section is optional and cosmetic. Keep only one '@' for undefined versioned symbols, which are defined in shared objects, in the symbol string table. Update "nm -D" to display only one '@' for undefined versioned symbols. bfd/ PR ld/26382 * elflink.c (elf_link_output_symstrtab): Keep only one '@' for versioned symbols, which are defined in shared objects, in symbol string table. binutils/ PR ld/26382 * nm.c (print_symname): Display only one '@' for undefined versioned symbols. * doc/binutils.texi: Update nm version information. ld/ PR ld/26382 * testsuite/ld-elf/pr26302.nd: Updated. * testsuite/ld-elf/pr26302.rd: New file. * testsuite/ld-elf/shared.exp: Add a test for readelf -sW. (cherry picked from commit 3f2e9699234ca31d083bc93ea6e03903f10baeaf) (cherry picked from commit 0a690cf659075e47ec1f7aecf332e641b0bb0ed5)
Diffstat (limited to 'ld/testsuite/ld-elf/shared.exp')
-rw-r--r--ld/testsuite/ld-elf/shared.exp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 014937175fc..4de5b341834 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -856,7 +856,8 @@ run_cc_link_tests [list \
"-shared -Wl,--no-as-needed tmpdir/pr26302a.so" \
"-fPIC" \
{pr26302b.c} \
- {{nm {-u} pr26302.nd} \
+ {{readelf {-sW} pr26302.rd} \
+ {nm {-u} pr26302.nd} \
{nm {-u -D} pr26302.nd} \
{nm {-u -D --with-symbol-versions} pr26302.nd}} \
"pr26302b.so" \