bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/17550] Section groups (comdat/linkonce) create undefined symbols


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/17550] Section groups (comdat/linkonce) create undefined symbols unnecessarily
Date: Thu, 12 Jul 2018 15:47:44 +0000

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

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The binutils-2_31-branch branch has been updated by Alan Modra
<address@hidden>:

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

commit ae0e76dcfcb7a8d2d8b5cbd7fcb976b5825534fb
Author: Alan Modra <address@hidden>
Date:   Tue Jul 3 12:18:10 2018 +0930

    Hide dynamic symbols in discarded sections

    This is a followup to git commit 97196564c7 "Strip global symbol
    defined in discarded section".  If a symbol defined in a discarded
    section was dynamic, that patch left .dynsym with holes (ie. all zero
    entries).  For example, the following from libstdc++.so:

    Symbol table '.dynsym' contains 6090 entries:
       Num:    Value          Size Type    Bind   Vis      Ndx Name
         0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
         1: 00000000000a74e0     0 SECTION LOCAL  DEFAULT   10
         2: 0000000000264180     0 SECTION LOCAL  DEFAULT   17
         3: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND
_ITM_addUserCommitAction
         4: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_memcpyRtWn
         5: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
    readelf: Warning: local symbol 5 found at index >= .dynsym's sh_info value
of 3
         6: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
    readelf: Warning: local symbol 6 found at index >= .dynsym's sh_info value
of 3
    [snip]

    This patch removes the symbols from .dynsym too.

        PR 17550
        * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
        in discarded sections.

    (cherry picked from commit af0bfb9c4283ce80fe37ad6360d12cae8ec38696)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]