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

Jan Beulich jbeulich@suse.com
Tue Jul 1 06:14:12 GMT 2025


On 01.07.2025 02:08, Indu Bhagat wrote:
> On 6/27/25 7:10 AM, 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>
> 
> Looks good to me.  Thanks for working on this.

And hence, as previously indicated: Okay.

Jan


More information about the Binutils mailing list