[RFC,0/4] Fix relocatable links with SFrame section

Message ID 20250308073853.78738-1-indu.bhagat@oracle.com
Headers
Series Fix relocatable links with SFrame section |

Message

Indu Bhagat March 8, 2025, 7:38 a.m. UTC
  Hi,

This patch series resolves two PRs related to relocatable links
involving SFrame sections:

PR ld/32666 - Incorrect .rela.sframe when using ld -r
PR libsframe/32589 - function start address is zero in SFrame section dump

The series also addresses a thinko in GAS/ld.bfd related to SFrame FDE
func_start_addr.

I will post my notes on why this series is an RFC separately next.

Thanks,
Indu Bhagat (4):
  gas: ld: sframe: fix RELA r_offset handling
  objdump, readelf: sframe: apply relocations before textual dump
  ld: bfd: sframe: fix incorrect r_offset in RELA entries
  ld: bfd: sframe: fix incorrect r_addend in RELA entries

 bfd/elf-bfd.h                                 |  13 +++
 bfd/elf-sframe.c                              | 106 ++++++++++++++++--
 bfd/elf.c                                     |   3 +
 bfd/elflink.c                                 |  30 ++++-
 bfd/elfxx-x86.c                               |   9 +-
 binutils/dwarf.c                              |  36 ++++++
 binutils/dwarf.h                              |   1 +
 binutils/objdump.c                            |  55 ++++-----
 binutils/readelf.c                            |  48 ++------
 gas/gen-sframe.c                              |  10 +-
 .../cfi-sframe-aarch64-pac-ab-key-1.d         |   8 +-
 include/sframe.h                              |   2 +-
 ld/testsuite/ld-x86-64/sframe-reloc-1.d       |  34 ++++++
 ld/testsuite/ld-x86-64/x86-64.exp             |   1 +
 14 files changed, 252 insertions(+), 104 deletions(-)
 create mode 100644 ld/testsuite/ld-x86-64/sframe-reloc-1.d