https://sourceware.org/bugzilla/show_bug.cgi?id=18720

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by H.J. Lu <h...@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6e33951edcbed1fd803beabcde2af3b252b92164

commit 6e33951edcbed1fd803beabcde2af3b252b92164
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Fri Aug 7 05:04:21 2015 -0700

    Properly merge hidden versioned symbol

    The hidden versioned symbol can only be merged with the versioned
    symbol with the same symbol version.  _bfd_elf_merge_symbol should
    check the symbol version before merging the new hidden versioned
    symbol with the existing symbol.  _bfd_elf_link_hash_copy_indirect can't
    copy any references to the hidden versioned symbol.   We need to
    bind a symbol locally when linking executable if it is locally defined,
    hidden versioned, not referenced by shared library and not exported.

    bfd/

        PR ld/18720
        * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
        if the new symbol matches the existing one.  The new hidden
        versioned symbol matches the existing symbol if they have the
        same symbol version. Update the existing symbol only if they
        match.
        (_bfd_elf_add_default_symbol): Update call to
        _bfd_elf_merge_symbol.
        (_bfd_elf_link_assign_sym_version): Don't set the hidden field
        here.
        (elf_link_add_object_symbols): Override a definition only if the
        new symbol matches the existing one.
        (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
        the hidden versioned symbol.
        (elf_link_output_extsym): Bind a symbol locally when linking
        executable if it is locally defined, hidden versioned, not
        referenced by shared library and not exported.  Turn on
        VERSYM_HIDDEN only if the hidden vesioned symbol is defined
        locally.

    ld/testsuite/

        PR ld/18720
        * ld-elf/indirect.exp: Run tests for PR ld/18720.
        * ld-elf/pr18720.out: New file.
        * ld-elf/pr18720a.c: Likewise.
        * ld-elf/pr18720b.c: Likewise.
        * ld-elf/pr18720c.c: Likewise.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to