This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] Update _bfd_elf_symbol_refs_local_p/add UNDEFINED_WEAK_RESOLVED_TO_ZERO


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!

> and handle undefined
> weak symbols and check version script.

You don't say why this is necessary.  I suspect it's just one of the
cases where you discovered that forced_local changes.

You also didn't justify moving zero_undefweak to the generic elf
flags.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]