bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/28157] gas: .symver *, *@*, remove cannot be used in relocation


From: cvs-commit at gcc dot gnu.org
Subject: [Bug gas/28157] gas: .symver *, *@*, remove cannot be used in relocation
Date: Mon, 16 Aug 2021 13:50:01 +0000

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

--- Comment #6 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 <hjl@sourceware.org>:

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

commit eb09df162bafa67abee713be594a99bd20bd6825
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Aug 16 06:46:44 2021 -0700

    as: Replace the removed symbol with the versioned symbol

    When a symbol removed by .symver is used in relocation and there is one
    and only one versioned symbol, don't remove the symbol.  Instead, mark
    it to be removed and replace the removed symbol used in relocation with
    the versioned symbol before generating relocation.

            PR gas/28157
            * symbols.c (symbol_flags): Add removed.
            (symbol_entry_find): Updated.
            (symbol_mark_removed): New function.
            (symbol_removed_p): Likewise.
            * symbols.h (symbol_mark_removed): New prototype.
            (symbol_removed_p): Likewise.
            * write.c (write_relocs): Call obj_fixup_removed_symbol on
            removed fixp->fx_addsy and fixp->fx_subsy if defined.
            (set_symtab): Don't add a symbol if symbol_removed_p returns true.
            * config/obj-elf.c (elf_frob_symbol):  Don't remove the symbol
            if it is used on relocation.  Instead, mark it as to be removed
            and issue an error if the symbol has more than one versioned name.
            (elf_fixup_removed_symbol): New function.
            * config/obj-elf.h (elf_fixup_removed_symbol): New prototype.
            (obj_fixup_removed_symbol): New.
            * testsuite/gas/symver/symver11.d: Updated expected error
            message.
            * testsuite/gas/symver/symver16.d: New file.
            * testsuite/gas/symver/symver16.s: Likewise.

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