[PATCH 1/2] Update _bfd_elf_symbol_refs_local_p/add UNDEFINED_WEAK_RESOLVED_TO_ZERO
H.J. Lu
hjl.tools@gmail.com
Mon Oct 9 04:08:00 GMT 2017
On 10/8/17, H.J. Lu <hjl.tools@gmail.com> wrote:
> On 10/8/17, Alan Modra <amodra@gmail.com> wrote:
>> On Fri, Oct 06, 2017 at 05:29:08PM -0700, H.J. Lu wrote:
>>> Update _bfd_elf_symbol_refs_local_p to cache result
>>
>> Caching the result is a really bad idea. It's not as if the function
>> is anywhere near the top of any profiling result, and to cache return
>> value you need to be sure that the return value won't change between
>> the first call and the last in every target. That isn't true, as even
>> a cursory examination of the code in _bfd_elf_symbol_refs_local_p
>> should reveal. forced_local changes in many places!
>
> You are right. This only works with
>
> CHECK_RELOCS_AFTER_OPEN_INPUT=yes
>
> which should also speedup check_relocs and GC. It should be set
> for all ELF targets.
>
Here is a patch which does that.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ELF-Call-check_relocs-after-opening-all-inputs.patch
Type: text/x-patch
Size: 27439 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20171009/409c4751/attachment.bin>
More information about the Binutils
mailing list