PING [PATCH] elf: Keep only one '@' for undefined versioned symbols

H.J. Lu hjl.tools@gmail.com
Sat Aug 22 15:29:19 GMT 2020


On Sat, Aug 22, 2020 at 8:05 AM Nick Clifton <nickc@redhat.com> wrote:
>
> Hi H.J.
>
> >> The symbol string table in the .symtab section is optional.  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.
> >>
> >> 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.
>
> Approved - please apply - but ... please could you also add a sentance
> or two to the description of nm's -D option in binutils.texi making it
> clear that one @ symbol means either a hidden or an undefined symbol.
>

Here is the updated patch I am checking.  nm documentation now reads:

  * The symbol name.  If a symbol has version information associated
     with it, then the version information is displayed as well.  If the
     versioned symbol is undefined or hidden from linker, the version
     string is displayed as a suffix to the symbol name, preceded by an
     @ character.  For example 'foo@VER_1'.  If the version is the
     default version to be used when resolving unversioned references to
     the symbol, then it is displayed as a suffix preceded by two @
     characters.  For example 'foo@@VER_2'.

Thanks.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-elf-Keep-only-one-for-undefined-versioned-symbols.patch
Type: text/x-patch
Size: 5275 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200822/db90ecba/attachment.bin>


More information about the Binutils mailing list