[PATCH] as: Replace the removed symbol with the versioned symbol

Alan Modra amodra@gmail.com
Mon Aug 16 09:01:33 GMT 2021


On Fri, Aug 13, 2021 at 03:44:12PM -0700, H.J. Lu wrote:
> On Sun, Aug 1, 2021 at 8:16 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> >         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.

OK.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list