[V3 00/36] SFrame V3 patchset
Indu Bhagat
indu.bhagat@oracle.com
Tue Jan 13 11:12:04 GMT 2026
Hi,
This is the V3 of the previously posted RFC series with the same name.
V1 posting: https://inbox.sourceware.org/binutils/20251229092910.1443618-1-indu.bhagat@oracle.com/
For a detailed cover letter, please see V2 posting https://inbox.sourceware.org/binutils/20260107084228.2213703-1-indu.bhagat@oracle.com/
Changes in V3
-------------
Addressed review comments, bugfixes and some new tests. More details in
each commit log.
Pending work
-------------
Following are being worked on:
- Specification changes WIP.
- Discuss s390x flex FDE usage with s390 maintainer.
For ease of review and testing, the complete set is available at branch:
users/ibhagat/sframe-v3-jan13-v3.
Thanks,
Indu Bhagat (36):
[SFrame-V3] readelf: testsuite: sframe: add new SFrame V2 test
[SFrame-V3] libsframe: testsuite: add a new test for SFrame V2
[SFrame-V3] libsframe: remove old sframe_decoder_get_funcdesc API
[SFrame-V3] sframe: use const for sframe_decoder_ctx object arg
[SFrame-V3] sframe: gas: bfd: ld: format bump to version 3
[SFrame-V3] libsframe: bump so version to libsframe.so.3.0.0
[SFrame-V3] libsframe: add V3 APIs for adding and getting SFrame FDE
[SFrame-V3] sframe: gas: libsframe: use uint16_t for num_fres of FDE
[SFrame-V3] sframe: gas: libsframe: remove padding field from FDE
[SFrame-V3] include: libsframe: bfd: gas: testsuite: support for
signed 64-bit offset in SFrame FDE
[SFrame-V3] sframe: gas: bfd: add support for signal frames
[SFrame-V3] gas: sframe: allow SFrame FDEs with 0 FREs for signal
frames
[SFrame-V3] include: sframe: s390x: keep unused bits when possible
[SFrame-V3] include: gas: libsframe: add 8-bits of func_info2 for
extensibility in FDE
[SFrame-V3] include: sframe: reserve 5 bits for new FDE types
[SFrame-V3] gas: bfd: include: libsframe: fixup terminology 'PC Type'
vs 'FDE Type'
[SFrame-V3] gas: sframe: use three states for location tracking
[SFrame-V3] gas: sframe: output new FDE type SFRAME_FDE_TYPE_FLEX
[SFrame-V3] libsframe: testsuite: add new argument to offset access
APIs
[SFrame-V3] libsframe: textual dump of fde type SFRAME_FDE_TYPE_FLEX
[SFrame-V3] gas: sframe: add new backend hook
sframe_support_flex_fde_p for FLEX FDEs
[SFrame-V3] sframe: gas: translate specific CFI directives for
SFRAME_FDE_TYPE_FLEX
[SFrame-V3] gas: x86: testsuite: add new testcases for
SFRAME_FDE_TYPE_FLEX
[SFrame-V3] gas: sframe: testsuite: handle .cfi_register FP/RA for
flex FDE
[SFrame-V3] gas: sframe: testsuite: skip SFrame FDE if .cfi_register
SP, reg
[SFrame-V3] gas: sframe: testsuite: handle .cfi_offset for RA
[SFrame-V3] bfd: ld: sframe: avoid unnecessary decoding of SFrame FREs
at link time
[SFrame-V3] include: gas: libsframe: split FDE into idx and attr
[SFrame-V3] gas: sframe: doc: testsuite: add new command line option
--gsframe-3
[SFrame-V3] ld: add --discard-sframe command line option
[SFrame-V3] ld: testsuite: x86: sframe: check link of signal frame and
outermost frames
[SFrame-V3] gas: binutils: ld: NEWS: add SFrame v3 related
announcements
[SFrame-V3] include: libsframe: remove SFRAME_F_FRAME_POINTER flag
[SFrame-V3][WIP] sframe: doc: specification changes for SFrame version
3
[SFrame-V3][RFC] sframe: gas: testsuite: enable flex FDE for s390x
[SFrame-V3] libsframe: testsuite: add new testcases for
SFRAME_FDE_TYPE_FLEX
bfd/elf-sframe.c | 65 +-
bfd/elf64-s390.c | 22 +-
bfd/elfxx-x86.c | 24 +-
binutils/NEWS | 8 +
.../binutils-all/s390/README-sframe-tests | 175 ++++
.../testsuite/binutils-all/s390/sframe.exp | 63 ++
.../s390/test-v2-ET_EXEC.sframe.bz2 | Bin 0 -> 1498 bytes
.../s390/test-v2-ET_EXEC.sframe.dump | 51 +
.../s390/test-v2-ET_REL.sframe.bz2 | Bin 0 -> 851 bytes
.../s390/test-v2-ET_REL.sframe.dump | 42 +
.../binutils-all/x86-64/README-sframe-tests | 96 ++
.../binutils-all/x86-64/objdump-sframe-01.d | 2 +-
.../binutils-all/x86-64/readelf-sframe-01.d | 2 +-
.../testsuite/binutils-all/x86-64/sframe.exp | 63 ++
.../x86-64/test-v2-ET_EXEC.sframe.bz2 | Bin 0 -> 1424 bytes
.../x86-64/test-v2-ET_EXEC.sframe.dump | 45 +
.../x86-64/test-v2-ET_REL.sframe.bz2 | Bin 0 -> 777 bytes
.../x86-64/test-v2-ET_REL.sframe.dump | 33 +
gas/NEWS | 9 +
gas/as.c | 16 +-
gas/as.h | 7 +
gas/config/tc-aarch64.c | 8 +
gas/config/tc-aarch64.h | 4 +
gas/config/tc-i386.c | 7 +
gas/config/tc-i386.h | 4 +
gas/config/tc-s390.c | 8 +
gas/config/tc-s390.h | 4 +
gas/doc/as.texi | 7 +-
gas/gen-sframe.c | 744 +++++++++++----
gas/gen-sframe.h | 31 +-
gas/sframe-opt.c | 13 +-
.../gas/cfi-sframe/cfi-sframe-aarch64-1.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-aarch64-2.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-aarch64-3.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-aarch64-4.d | 2 +-
.../cfi-sframe-aarch64-pac-ab-key-1.d | 2 +-
.../cfi-sframe-aarch64-ra-undefined-1.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-1.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-10.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-11.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-12.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-13.d | 19 +
.../gas/cfi-sframe/cfi-sframe-common-13.s | 3 +
.../gas/cfi-sframe/cfi-sframe-common-1d.d | 13 +
.../gas/cfi-sframe/cfi-sframe-common-1d.s | 2 +
.../gas/cfi-sframe/cfi-sframe-common-2.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-3.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-4.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-5.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-6.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-7.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-8.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-common-9.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-s390x-1.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-s390x-2.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-s390x-3.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-s390x-err-3.d | 2 +-
...s390x-err-2.d => cfi-sframe-s390x-err-4.d} | 6 +-
.../gas/cfi-sframe/cfi-sframe-s390x-err-4.s | 5 +
.../cfi-sframe-s390x-fpra-offset-1.d | 2 +-
.../cfi-sframe-s390x-fpra-offset-2.d | 2 +-
.../cfi-sframe-s390x-fpra-register-1.d | 12 +-
.../cfi-sframe-s390x-fpra-register-2.d | 10 +-
.../cfi-sframe-s390x-non-spfp-cfa-1.d | 24 +
...-1.s => cfi-sframe-s390x-non-spfp-cfa-1.s} | 0
.../cfi-sframe-s390x-non-spfp-cfa-2.d | 24 +
...-2.s => cfi-sframe-s390x-non-spfp-cfa-2.s} | 0
.../gas/cfi-sframe/cfi-sframe-s390x-pr33756.d | 2 +-
.../cfi-sframe-s390x-ra-undefined-1.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-x86_64-1.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-x86_64-2.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-x86_64-3.d | 2 +-
.../gas/cfi-sframe/cfi-sframe-x86_64-4.d | 29 +
.../gas/cfi-sframe/cfi-sframe-x86_64-4.s | 80 ++
.../gas/cfi-sframe/cfi-sframe-x86_64-5.d | 21 +
.../gas/cfi-sframe/cfi-sframe-x86_64-5.s | 12 +
.../gas/cfi-sframe/cfi-sframe-x86_64-6.d | 25 +
.../gas/cfi-sframe/cfi-sframe-x86_64-6.s | 16 +
.../cfi-sframe/cfi-sframe-x86_64-empty-1.d | 2 +-
.../cfi-sframe/cfi-sframe-x86_64-empty-2.d | 2 +-
.../cfi-sframe/cfi-sframe-x86_64-empty-3.d | 2 +-
.../cfi-sframe/cfi-sframe-x86_64-empty-4.d | 2 +-
...0x-err-1.d => cfi-sframe-x86_64-empty-5.d} | 8 +-
.../cfi-sframe/cfi-sframe-x86_64-empty-5.s | 8 +
.../cfi-sframe-x86_64-empty-pr33277.d | 2 +-
.../cfi-sframe/cfi-sframe-x86_64-esc-expr-1.d | 26 +
.../cfi-sframe/cfi-sframe-x86_64-esc-expr-1.s | 43 +
.../cfi-sframe/cfi-sframe-x86_64-esc-expr-2.d | 24 +
.../cfi-sframe/cfi-sframe-x86_64-esc-expr-2.s | 13 +
.../cfi-sframe/cfi-sframe-x86_64-esc-expr-3.d | 26 +
.../cfi-sframe/cfi-sframe-x86_64-esc-expr-3.s | 18 +
.../cfi-sframe/cfi-sframe-x86_64-pr33170.d | 2 +-
.../cfi-sframe/cfi-sframe-x86_64-pr33756.d | 2 +-
.../cfi-sframe-x86_64-ra-undefined-1.d | 2 +-
.../cfi-sframe-x86_64-ra-undefined-flex-1.d | 23 +
.../cfi-sframe-x86_64-ra-undefined-flex-1.s | 15 +
.../cfi-sframe/cfi-sframe-x86_64-signal-1.d | 18 +
.../cfi-sframe/cfi-sframe-x86_64-signal-1.s | 12 +
gas/testsuite/gas/cfi-sframe/cfi-sframe.exp | 16 +-
gas/testsuite/gas/cfi-sframe/common-empty-2.d | 2 +-
gas/testsuite/gas/cfi-sframe/common-empty-3.d | 2 +-
.../gas/scfi/x86_64/scfi-cfi-sections-1.d | 2 +-
.../gas/scfi/x86_64/scfi-dyn-stack-1.d | 2 +-
include/bfdlink.h | 4 +
include/sframe-api.h | 111 ++-
include/sframe.h | 144 ++-
ld/Makefile.am | 3 +-
ld/Makefile.in | 4 +-
ld/NEWS | 12 +
ld/configure | 11 +-
ld/configure.ac | 6 +
ld/emulparams/elf64_s390.sh | 1 +
ld/emulparams/elf_x86_64.sh | 1 +
ld/emulparams/sframe-info.sh | 15 +
ld/emultempl/aarch64elf.em | 7 +
ld/ld.texi | 10 +-
ld/ldlex.h | 2 +
ld/lexsup.c | 15 +-
ld/testsuite/ld-aarch64/aarch64-elf.exp | 1 +
.../ld-aarch64/sframe-command-line-1.d | 8 +
ld/testsuite/ld-aarch64/sframe-simple-1.d | 2 +-
ld/testsuite/ld-s390/s390.exp | 1 +
ld/testsuite/ld-s390/sframe-command-line-1.d | 8 +
ld/testsuite/ld-s390/sframe-plt-1.d | 2 +-
ld/testsuite/ld-s390/sframe-simple-1.d | 2 +-
.../ld-x86-64/sframe-command-line-1.d | 8 +
ld/testsuite/ld-x86-64/sframe-ibt-plt-1.d | 2 +-
ld/testsuite/ld-x86-64/sframe-link-1.d | 38 +
ld/testsuite/ld-x86-64/sframe-plt-1.d | 2 +-
ld/testsuite/ld-x86-64/sframe-pltgot-1.d | 2 +-
ld/testsuite/ld-x86-64/sframe-pltgot-2.d | 2 +-
ld/testsuite/ld-x86-64/sframe-reloc-1.d | 2 +-
ld/testsuite/ld-x86-64/sframe-signal.s | 18 +
ld/testsuite/ld-x86-64/sframe-simple-1.d | 2 +-
ld/testsuite/ld-x86-64/sframe-start.s | 15 +
ld/testsuite/ld-x86-64/x86-64.exp | 2 +
libsframe/Makefile.in | 102 ++
libsframe/doc/sframe-spec.texi | 717 ++++++++++----
libsframe/libsframe.ver | 18 +-
libsframe/libtool-version | 2 +-
libsframe/sframe-dump.c | 434 +++++++--
libsframe/sframe.c | 895 ++++++++++++++----
.../testsuite/libsframe.decode/DATA-BE-V3 | Bin 0 -> 77 bytes
libsframe/testsuite/libsframe.decode/DATA-V2 | Bin 0 -> 98 bytes
libsframe/testsuite/libsframe.decode/DATA2 | Bin 98 -> 100 bytes
.../libsframe.decode/README-be-flipping-v3 | 58 ++
.../libsframe.decode/be-flipping-v3.c | 118 +++
.../testsuite/libsframe.decode/decode.exp | 12 +
.../testsuite/libsframe.decode/frecnt-v2.c | 90 ++
libsframe/testsuite/libsframe.decode/local.mk | 11 +-
.../testsuite/libsframe.encode/encode-1.c | 30 +-
libsframe/testsuite/libsframe.find/find.exp | 4 +
.../testsuite/libsframe.find/findfre-1.c | 53 +-
.../testsuite/libsframe.find/findfre-flex-1.c | 205 ++++
.../testsuite/libsframe.find/findfunc-1.c | 63 +-
libsframe/testsuite/libsframe.find/local.mk | 6 +-
.../testsuite/libsframe.find/plt-findfre-1.c | 38 +-
.../testsuite/libsframe.find/plt-findfre-2.c | 43 +-
158 files changed, 4628 insertions(+), 920 deletions(-)
create mode 100644 binutils/testsuite/binutils-all/s390/README-sframe-tests
create mode 100644 binutils/testsuite/binutils-all/s390/sframe.exp
create mode 100644 binutils/testsuite/binutils-all/s390/test-v2-ET_EXEC.sframe.bz2
create mode 100644 binutils/testsuite/binutils-all/s390/test-v2-ET_EXEC.sframe.dump
create mode 100644 binutils/testsuite/binutils-all/s390/test-v2-ET_REL.sframe.bz2
create mode 100644 binutils/testsuite/binutils-all/s390/test-v2-ET_REL.sframe.dump
create mode 100644 binutils/testsuite/binutils-all/x86-64/README-sframe-tests
create mode 100644 binutils/testsuite/binutils-all/x86-64/sframe.exp
create mode 100644 binutils/testsuite/binutils-all/x86-64/test-v2-ET_EXEC.sframe.bz2
create mode 100644 binutils/testsuite/binutils-all/x86-64/test-v2-ET_EXEC.sframe.dump
create mode 100644 binutils/testsuite/binutils-all/x86-64/test-v2-ET_REL.sframe.bz2
create mode 100644 binutils/testsuite/binutils-all/x86-64/test-v2-ET_REL.sframe.dump
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-13.d
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-13.s
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1d.d
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1d.s
rename gas/testsuite/gas/cfi-sframe/{cfi-sframe-s390x-err-2.d => cfi-sframe-s390x-err-4.d} (54%)
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-err-4.s
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-non-spfp-cfa-1.d
rename gas/testsuite/gas/cfi-sframe/{cfi-sframe-s390x-err-1.s => cfi-sframe-s390x-non-spfp-cfa-1.s} (100%)
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-non-spfp-cfa-2.d
rename gas/testsuite/gas/cfi-sframe/{cfi-sframe-s390x-err-2.s => cfi-sframe-s390x-non-spfp-cfa-2.s} (100%)
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-4.d
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-4.s
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-5.d
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-5.s
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-6.d
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-6.s
rename gas/testsuite/gas/cfi-sframe/{cfi-sframe-s390x-err-1.d => cfi-sframe-x86_64-empty-5.d} (50%)
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-empty-5.s
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-esc-expr-1.d
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-esc-expr-1.s
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-esc-expr-2.d
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-esc-expr-2.s
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-esc-expr-3.d
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-esc-expr-3.s
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-ra-undefined-flex-1.d
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-ra-undefined-flex-1.s
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-signal-1.d
create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-signal-1.s
create mode 100644 ld/emulparams/sframe-info.sh
create mode 100644 ld/testsuite/ld-aarch64/sframe-command-line-1.d
create mode 100644 ld/testsuite/ld-s390/sframe-command-line-1.d
create mode 100644 ld/testsuite/ld-x86-64/sframe-command-line-1.d
create mode 100644 ld/testsuite/ld-x86-64/sframe-link-1.d
create mode 100644 ld/testsuite/ld-x86-64/sframe-signal.s
create mode 100644 ld/testsuite/ld-x86-64/sframe-start.s
create mode 100644 libsframe/testsuite/libsframe.decode/DATA-BE-V3
create mode 100644 libsframe/testsuite/libsframe.decode/DATA-V2
create mode 100644 libsframe/testsuite/libsframe.decode/README-be-flipping-v3
create mode 100644 libsframe/testsuite/libsframe.decode/be-flipping-v3.c
create mode 100644 libsframe/testsuite/libsframe.decode/frecnt-v2.c
create mode 100644 libsframe/testsuite/libsframe.find/findfre-flex-1.c
--
2.43.0
More information about the Binutils
mailing list