bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos


From: cvs-commit at gcc dot gnu.org
Subject: [Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos
Date: Tue, 23 Apr 2024 12:38:01 +0000

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

--- Comment #34 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

commit ef1c830f003acaf149bb9ee230be0d0067e1855c
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Apr 22 09:29:28 2024 +0930

    ignore some symbols in elf.c:swap_out_syms

    The reason behind this patch was noticing that generic ELF targets
    fail to remove "bar" in the recently committed ld-elf/undefweak-1
    test.  (Despite that, those targets pass the test due to it being too
    strict when matching symbols.  "bar" gets turned into a local weak
    defined absolute symbol.)

    swap_out_syms currently drops local section syms that are defined in
    discarded sections.  Extend that to also drop other symbols in
    discarded sections too, even global symbols.  The linker goes to quite
    a lot of effort to ensure globals in discarded section take a
    definition from the kept linkonce or comdat group section.  So the
    global sym change should only affect cases where something is quite
    wrong about the set of linkonce or comdat group sections.  However
    that change to elf_map_symbols meant we dropped _DYNAMIC_LINK /
    _DYNAMIC_LINKING for mips, a global absolute symbol given STT_SECTION
    type for some reason.  That problem is fixed by reverting the pr14493
    change which is no longer needed due to a) BSF_SECTION_SYM_USED on
    x86, and b) fixing objcopy to use copy_private_symbol_data.

    bfd/
            PR 14493
            * elf.c (ignore_sym): Rename from ignore_section_sym.  Return
            true for any symbol without a section or in a discarded section.
            Revert pr14493 change.
            (elf_map_symbols): Tidy.  Use ignore_sym on all symbols.
            (swap_out_syms): Tidy.
    ld/
            * testsuite/ld-elf/undefweak-1.rd: Match any "bar".

-- 
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]