[v3,0/3] sframe: Cleanups in .sframe generation

Message ID 20250228133203.1470383-1-jremus@linux.ibm.com
Headers
Series sframe: Cleanups in .sframe generation |

Message

Jens Remus Feb. 28, 2025, 1:31 p.m. UTC
  Changes in V3:
- New patch 3, replacing former patch 3.
- This time with patch notes.

Changes in V2:
- Implemented review feedback (see patch notes).
- Committed former patch 1 to mainline.
- New patch 3.

Patch 1 uses the respective SFrame header and FDE field sizes instead of
SFRAME_RELOC_SIZE when generating SFrame information from CFI directives
in the assembler.

Patch 2 (updated in V2) cleans up the use of the relocation cookie in
sframe_decoder_init_func_bfdinfo.

Patch 3 (new in V3) changes the assembler to emit FDE function start
address as function offset from .sframe section (instead of from FDE).
It changes the linker to only apply the output .sframe section offset
as fixup.

Indu, I hope it is ok that I am proposing a potential solution for the
SFrame FDE function start address contents in object files generated by
the assembler.  It is based on some naive experiment I stated during
last SFrame meetup.  It lacked only the fixup by output .sframe section
offset.  All SFrame related as, ld, and libsframe tests pass on both
x86-64 and s390x.  Does this resolve the issue discussed during the last
SFrame meetup?

Regards,
Jens

Jens Remus (3):
  gas: Use SFrame header and FDE field sizes when generating .sframe
  ld: Cleanup sframe_decoder_init_func_bfdinfo use of reloc cookie
  sframe: FDE function start address relative to SFrame section

 bfd/elf-sframe.c | 61 +++++++++++++++++++++++++++---------------------
 gas/gen-sframe.c | 40 +++++++++++++++----------------
 2 files changed, 54 insertions(+), 47 deletions(-)
  

Comments

Jens Remus March 10, 2025, 12:23 p.m. UTC | #1
On 28.02.2025 14:31, Jens Remus wrote:

> Patch 1 uses the respective SFrame header and FDE field sizes instead of
> SFRAME_RELOC_SIZE when generating SFrame information from CFI directives
> in the assembler.
> 
> Patch 2 (updated in V2) cleans up the use of the relocation cookie in
> sframe_decoder_init_func_bfdinfo.

> Jens Remus (3):
>    gas: Use SFrame header and FDE field sizes when generating .sframe
>    ld: Cleanup sframe_decoder_init_func_bfdinfo use of reloc cookie
>    sframe: FDE function start address relative to SFrame section


Pushed patches 1 and 2 with approval from Indu [1] and Jan [2] to mainline.

[1]: https://inbox.sourceware.org/binutils/468e682f-0879-4aca-a1ea-685c997b04cd@oracle.com/
[2]: https://inbox.sourceware.org/binutils/0a4086ba-1877-4f1d-912c-7ad6c3930676@suse.com/

Regards,
Jens