[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 02:26:00 GMT 2017
More information about the Binutils mailing list
Mon Oct 9 02:26:00 GMT 2017
- Previous message (by thread): [PATCH 1/2] Update _bfd_elf_symbol_refs_local_p/add UNDEFINED_WEAK_RESOLVED_TO_ZERO
- Next message (by thread): [PATCH 1/2] Update _bfd_elf_symbol_refs_local_p/add UNDEFINED_WEAK_RESOLVED_TO_ZERO
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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. >> 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. Yes, this needed by x86 convert_load_reloc, which runs during check_relocs. That is the only problem that forced_local changes after check_relocs with CHECK_RELOCS_AFTER_OPEN_INPUT=yes > You also didn't justify moving zero_undefweak to the generic elf > flags. > This is also used by sparc: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=b25a5c8f7a7c8b58939fe1e8cceffbad74db2af4 A single UNDEFINED_WEAK_RESOLVED_TO_ZERO is better than 3. -- H.J.
- Previous message (by thread): [PATCH 1/2] Update _bfd_elf_symbol_refs_local_p/add UNDEFINED_WEAK_RESOLVED_TO_ZERO
- Next message (by thread): [PATCH 1/2] Update _bfd_elf_symbol_refs_local_p/add UNDEFINED_WEAK_RESOLVED_TO_ZERO
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list