diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-08-22 08:31:53 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-08-22 08:32:02 -0700 |
commit | 3f2e9699234ca31d083bc93ea6e03903f10baeaf (patch) | |
tree | bfe2e473c96a1b7c9cc4e3f9ea8bb90d2d946521 /ld | |
parent | d19c3068ab17598662fe562e96bc1943b2b49736 (diff) | |
download | fsf-binutils-gdb-3f2e9699234ca31d083bc93ea6e03903f10baeaf.zip fsf-binutils-gdb-3f2e9699234ca31d083bc93ea6e03903f10baeaf.tar.gz fsf-binutils-gdb-3f2e9699234ca31d083bc93ea6e03903f10baeaf.tar.bz2 |
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.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr26302.nd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr26302.rd | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/shared.exp | 3 |
4 files changed, 22 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 0e3a859..4f57be8 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2020-08-22 H.J. Lu <hongjiu.lu@intel.com> + + 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. + 2020-08-20 Nick Clifton <nickc@redhat.com> PR 26428 diff --git a/ld/testsuite/ld-elf/pr26302.nd b/ld/testsuite/ld-elf/pr26302.nd index 1f2fbdf..bc9a675 100644 --- a/ld/testsuite/ld-elf/pr26302.nd +++ b/ld/testsuite/ld-elf/pr26302.nd @@ -1,3 +1,3 @@ #... - +U foo@@FOO + +U foo@FOO #pass diff --git a/ld/testsuite/ld-elf/pr26302.rd b/ld/testsuite/ld-elf/pr26302.rd new file mode 100644 index 0000000..8f7b8a9 --- /dev/null +++ b/ld/testsuite/ld-elf/pr26302.rd @@ -0,0 +1,12 @@ +#... +Symbol table '\.dynsym' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name +#... + +[0-9]+: +[a-f0-9]+ +0 +FUNC +GLOBAL +DEFAULT +UND +foo@FOO \([0-9]+\) +#... + +Symbol table '\.symtab' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name +#... + +[0-9]+: +[a-f0-9]+ +0 +FUNC +GLOBAL +DEFAULT +UND +foo@FOO +#pass diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index 0149371..4de5b34 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" \ |