[PATCH v3 0/3] sframe: Fix sframe handling when doing garbage collection

claudiu.zissulescu-ianculescu@oracle.com claudiu.zissulescu-ianculescu@oracle.com
Thu Jan 22 08:00:35 GMT 2026


From: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>

Hello,
 
Please find a series of patches that fixes the removing of sframe
sections during garbage collection. This patch series fixes the
bugzilla issue PR ld/32769.

What is new:
 - Function _bfd_elf_sframe_present_input_bfds uses bfd_get_section_by_name. 
 - Fix regressions in s390x.
 - Tests are simplified.

Best,
Claudiu


Claudiu Zissulescu (2):
  ld: bfd: sframe: KEEP .sframe sections and support gc-sections
  sframe: Add tests for PR ld/32769

Indu Bhagat (1):
  ld: sframe: do not generate .sframe for PLT if no .sframe is in input
    BFDs

 bfd/elf-bfd.h                                 |  7 ++++
 bfd/elf-sframe.c                              | 18 +++++++++
 bfd/elf64-s390.c                              | 10 ++++-
 bfd/elflink.c                                 | 38 ++++++++++++++-----
 bfd/elfxx-x86.c                               | 11 +++++-
 ld/scripttempl/elf.sc                         |  4 +-
 ld/testsuite/ld-sframe/pr32769-2.d            |  9 +++++
 ld/testsuite/ld-sframe/pr32769-2.s            | 19 ++++++++++
 ld/testsuite/ld-sframe/pr32769-3.d            | 10 +++++
 ld/testsuite/ld-sframe/pr32769-3.s            | 21 ++++++++++
 ld/testsuite/ld-sframe/pr32769.rd             | 14 +++++++
 ld/testsuite/ld-sframe/pr32769.s              |  8 ++++
 ld/testsuite/ld-sframe/sframe.exp             |  9 +++++
 ld/testsuite/ld-x86-64/sframe-baz.s           | 36 ++++++++++++++++++
 ld/testsuite/ld-x86-64/sframe-gc-sections-1.d | 20 ++++++++++
 ld/testsuite/ld-x86-64/sframe-gc-sections-2.s | 35 +++++++++++++++++
 .../ld-x86-64/sframe-gc-sections-2a.d         | 17 +++++++++
 .../ld-x86-64/sframe-gc-sections-2b.d         | 30 +++++++++++++++
 .../ld-x86-64/sframe-gc-sections-2b.t         | 11 ++++++
 ld/testsuite/ld-x86-64/x86-64.exp             |  3 ++
 20 files changed, 316 insertions(+), 14 deletions(-)
 create mode 100644 ld/testsuite/ld-sframe/pr32769-2.d
 create mode 100644 ld/testsuite/ld-sframe/pr32769-2.s
 create mode 100644 ld/testsuite/ld-sframe/pr32769-3.d
 create mode 100644 ld/testsuite/ld-sframe/pr32769-3.s
 create mode 100644 ld/testsuite/ld-sframe/pr32769.rd
 create mode 100644 ld/testsuite/ld-sframe/pr32769.s
 create mode 100644 ld/testsuite/ld-x86-64/sframe-baz.s
 create mode 100644 ld/testsuite/ld-x86-64/sframe-gc-sections-1.d
 create mode 100644 ld/testsuite/ld-x86-64/sframe-gc-sections-2.s
 create mode 100644 ld/testsuite/ld-x86-64/sframe-gc-sections-2a.d
 create mode 100644 ld/testsuite/ld-x86-64/sframe-gc-sections-2b.d
 create mode 100644 ld/testsuite/ld-x86-64/sframe-gc-sections-2b.t

-- 
2.52.0



More information about the Binutils mailing list