]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
elf: Store __ehdr_start hash in elf_link_hash_table
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 3 Feb 2025 03:30:50 +0000 (11:30 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 4 Feb 2025 05:02:58 +0000 (13:02 +0800)
commitbc61d5916a04605079723f6674bd33d2a923af2e
tree2796d665f4cddb59857a2155b6b1ed7e8b6819b4
parent13bc088de035ca92508545c3a71341d08102ed8d
elf: Store __ehdr_start hash in elf_link_hash_table

Since

commit 97da0e2677c4a38df2406576428ec27d1da26e7c
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Jan 12 23:42:23 2022 +1030

    tweak __ehdr_start visibility and flags for check_relocs

creates __ehdr_start hash in lang_symbol_tweaks, store __ehdr_start hash
in elf_link_hash_table so that we just need to lookup it up only once.

bfd/

* elf-bfd.h (elf_link_hash_table): Add hehdr_start.
* elf.c (assign_file_positions_for_load_sections): Use
hehdr_start.

ld/

* ldelf.c (ldelf_before_allocation): Use hehdr_start for
__ehdr_start hash.
* ldlang.c (lang_symbol_tweaks): Store hehdr_start hash in
hehdr_start.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
bfd/elf-bfd.h
bfd/elf.c
ld/ldelf.c
ld/ldlang.c