[PATCH] bfd: sframe: fix PR ld/33199

Indu Bhagat indu.bhagat@oracle.com
Thu Aug 14 16:20:49 GMT 2025


On 8/13/25 11:11 PM, Jan Beulich wrote:
> On 14.08.2025 07:14, Indu Bhagat via Binutils wrote:
>> Fix PR ld/33199 SEGV in _bfd_x86_elf_create_sframe_plt
>>
>> Currently, the selection for sframe_plt was not being done (and simply
>> set to NULL) for the case when !normal_target, causing SEGV on Solaris.
>> Initialize sframe_plt to init_table->sframe_lazy_plt when lazy_plt is
>> true, and NULL otherwise.  This is in line with htab->non_lazy_plt being
>> set to NULL for !normal_target.
>>
>> bfd/
>> 	PR ld/33199
>> 	* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
>> 	Setup sframe_plt for !normal_target.
> 
> Okay, albeit preferably with ...
> 
>> --- a/bfd/elfxx-x86.c
>> +++ b/bfd/elfxx-x86.c
>> @@ -4605,7 +4605,12 @@ _bfd_x86_elf_link_setup_gnu_properties
>>   	}
>>       }
>>     else
>> -    htab->sframe_plt = NULL;
>> +    {
>> +      if (lazy_plt)
>> +	htab->sframe_plt = init_table->sframe_lazy_plt;
>> +      else
>> +	htab->sframe_plt = NULL;
>> +    }
> 
> ... no extra scope used here, i.e. if becoming "else if (lazy_plt)". Makes
> for a smaller diff and less indentation overall.
> 

Thanks for reviewing.  Committed with that change.


More information about the Binutils mailing list