[PATCH v2] gas: sframe: Represent .cfi_undefined RA as SFrame FDE without FREs
Jens Remus
jremus@linux.ibm.com
Wed Jul 23 12:59:47 GMT 2025
On 23.07.2025 07:09, Indu Bhagat via Binutils wrote:
> On 7/22/25 8:05 PM, Indu Bhagat wrote:
>> On 7/22/25 9:08 AM, Jens Remus wrote:
>>> On 22.07.2025 16:31, Jens Remus wrote:
>>>> As replied in the other thread on libc-aplha there is no such indication
>>>> on s390x (s390 64-bit). I'll post a V3 of this patch, which introduces
>>>> a SFrame FDE infor word flag "ra_undefined".
>>>
>>> An attempt to build Glibc with my Binutils patch applied fails due to
>>> one or more relocation(s) out or range during link. I guess the .sframe
>>> merge logic chokes on a FDE without any FREs.
>>>
>>> Please let me know if you gave any guess, where I should start. I will
>>> continue tomorrow.
> A possible reason (not confirmed by debugging): In
> sframe_encoder_write_sframe, we do not emit SFrame section if there
> are no FREs:
>
> if (fr_info == NULL)
> return sframe_set_errno (&err, SFRAME_ERR_FRE_INVAL);
>
> This would cause us to emit no SFrame section, when now we want to
> emit an SFrame section with possibly zero FREs. In the link you run
> into problems with, there was likely only one object with its .sframe
> section having one SFrame FDE with no FREs among all the inputs.
Thanks a lot! That was indeed the culprit. Using that I managed to
get Binutils and Glibc backtrace working.
This did not cause any warnings/errors to be reported, as all callers
of sframe_encoder_write ignore the return code. Not sure whether we
should do something about that?
Regards,
Jens
--
Jens Remus
Linux on Z Development (D3303)
+49-7031-16-1128 Office
jremus@de.ibm.com
IBM
IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/
More information about the Binutils
mailing list