[PATCH] x86: ld: sframe: Remove SFrame NULL FRE template

Jan Beulich jbeulich@suse.com
Sun Jun 29 13:39:54 GMT 2025


On 27.06.2025 16:10, Jens Remus wrote:
> 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>

Just to clarify: If the two of you are in agreement here, then I'll simply
approve this change. I'm not deep enough into the subject to be able to
judge all on my own.

Jan


More information about the Binutils mailing list