]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86: ld: sframe: Remove SFrame NULL FRE template
authorJens Remus <jremus@linux.ibm.com>
Tue, 1 Jul 2025 15:56:10 +0000 (17:56 +0200)
committerJens Remus <jremus@linux.ibm.com>
Tue, 1 Jul 2025 15:56:10 +0000 (17:56 +0200)
commitb054ff604253af016657d5c93e2f69dab14cc53a
treeee24cc99b85f5180a01ebdb8f7e3c6ffb491ed73
parentdac12bc2426d5b639ad2d62d0f447dd037227c91
x86: ld: sframe: Remove SFrame NULL FRE template

A SFrame NULL FRE template is used as NULL value in some but not all
instances to initialize unused elements of SFrame FRE pointer arrays of
fixed size.  Additionally it is erroneously used as SFrame FRE template
for PLT GOT entries.

Define a separate SFrame FRE template for PLT GOT entries with the same
properties as the SFrame NULL FRE and use that for all PLT GOT entries.
Remove the SFrame NULL FRE template, as initialization of unused array
elements is not required, as demonstrated by the instances where it was
not done.

bfd/
* elf64-x86-64.c (elf_x86_64_sframe_null_fre): Remove.
(elf_x86_64_sframe_pltgot_fre1): New SFrame FRE template for
PLT GOT entries.
(elf_x86_64_sframe_non_lazy_plt,
elf_x86_64_sframe_non_lazy_ibt_plt): Do not initialize unused
FRE array elements with elf_x86_64_sframe_null_fre.  Use
elf_x86_64_sframe_pltgot_fre1 for PLT GOT.
(elf_x86_64_sframe_plt, elf_x86_64_sframe_ibt_plt): Use
elf_x86_64_sframe_pltgot_fre1 for PLT GOT.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
bfd/elf64-x86-64.c