[PATCH v2 2/3] sframe: additonal check in _bfd_x86_elf_link_setup_gnu_properties

Jens Remus jremus@linux.ibm.com
Fri Jan 16 11:13:58 GMT 2026


On 1/16/2026 10:37 AM, Jan Beulich wrote:
> On 14.01.2026 11:34, Jens Remus wrote:
>> On 1/14/2026 11:05 AM, claudiu.zissulescu-ianculescu@oracle.com wrote:
>>> From: Indu Bhagat <indu.bhagat@oracle.com>
>>>
>>> GNU ld creates SFrame stack trace info for the .plt* sections.  These
>>> linker created sections are created in
>>> _bfd_x86_elf_link_setup_gnu_properties (), but data is emitted into
>>> them a bit later in _bfd_x86_elf_late_size_sections ().
>>>
>>> With SFrame sections now marked KEEP in scripttempl/elf.sc, and the
>>> presence of these linker created SFrame sections cause emission of an
>>> empty .sframe for all ELF targets (IIUC), even when all input bfd's
>>> have no .sframe section.
>>>
>>> This patch is an attempt to avoid creation of empty .sframe in linked
>>> objects on x86_64 and s390x, when none of the inputs had SFrame sections.
>>
>> Thanks for taking care of s390x!  _bfd_elf_sframe_present_input_bfds is
>> also a neat improvement.
> 
> And Arm64 doesn't need a similar adjustment?

No, as the linker for aarch64 does not (yet) generate .sframe for PLT.

One would need to port s390 commit 22472454fab8 ("s390: Add SFrame stack
trace information for .plt section") and possibly parts of s390 commit
98d9fe6cb62e ("s390: Generate .eh_frame unwind information for .plt
section") to aarch64.

Regards,
Jens
-- 
Jens Remus
Linux on Z Development (D3303)
jremus@de.ibm.com / jremus@linux.ibm.com

IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Ehningen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/



More information about the Binutils mailing list