binutils-gdb/include
Indu Bhagat 832ca9ef67 [SFrame-V3] ld: add --discard-sframe command line option
Add a new command line option --discard-sframe to the linker.
This option allows users to prevent the linker from generating an output
.sframe section.

The rationale for this option is: Consider the case when say, the distro
is shipped with SFrame sections in the installed binaries/libraries. A
user application using these installed libraries, but not enabling
.sframe for itself just yet, will see an output .sframe corresponding to
the pulled in libraries.  This is "partial" .sframe information for the
application.  Adding such an option to the linker, gives user a way to
turn off the .sframe section completely without relying on a linker
script.

Previously, the existing --no-ld-generated-unwind-info option
controlled whether (not just .eh_frame for PLT entries, but also) SFrame
for PLT entries. The new command line option,
--discard-sframe now decouples SFrame from other unwind
formats (like .eh_frame), allowing for more control over the output
binary's SFrame data.

The option is added for architectures that currently support SFrame:
AArch64, s390x, and x86_64.

bfd/
	* elf-sframe.c (_bfd_elf_parse_sframe): Mark with SEC_EXCLUDE if
	--discard-sframe is in effect.
	* elf64-s390.c (elf_s390_create_dynamic_sections): Use
	discard_sframe to guard .sframe section creation.
	* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
include/
	* bfdlink.h (struct bfd_link_info): Add discard_sframe bitfield.
ld/
	* ldlex.h (enum option_values): Add OPTION_NO_LD_SFRAME_INFO.
	* lexsup.c (elf_sframe_list_options): New function.
	(ld_list_options): Add sframe_info argument. Update callers.
	* ld.texi: Update documentation.
	* emulparams/sframe-info.sh: New file.
	* emultempl/aarch64elf.em: Add --discard-sframe option
	listing and handling.
	* emulparams/elf64_s390.sh: Likewise.
	* emulparams/elf_x86_64.sh: Likewise.
	* Makefile.am: Update to handle sframe-info.sh and new list options.
	* configure.ac: Handle SFRAME_INFO target variable.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
ld/testsuite/
	* ld-x86-64/x86-64.exp: New test.
	* ld-x86-64/sframe-command-line-1.d: New test.
	* ld-aarch64/aarch64-elf.exp: New test.
	* ld-s390/s390.exp: New test.
	* ld-x86-64/x86-64.exp: New test.
	* ld-aarch64/sframe-command-line-1.d: New test.
	* ld-s390/sframe-command-line-1.d: New test.
	* ld-x86-64/sframe-command-line-1.d: New test.
2026-01-15 17:02:27 -08:00
..
aout Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
cgen Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
coff Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
elf RISC-V: Add second-pass relaxation for JAL to C.J/C.JAL 2026-01-15 12:04:57 +08:00
gdb Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
mach-o Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
opcode aarch64: Add support for POE2 PLBI instruction 2026-01-05 17:50:55 +00:00
sim Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
som Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
vms Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
alloca-conf.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ansidecl.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
bfdlink.h [SFrame-V3] ld: add --discard-sframe command line option 2026-01-15 17:02:27 -08:00
binary-io.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ChangeLog Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ChangeLog-0415 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-2016 ChangeLog rotation 2017-01-02 13:55:05 +10:30
ChangeLog-2017 ChangeLog rotation 2018-01-03 17:49:42 +10:30
ChangeLog-2018 ChangeLog rotation 2019-01-01 21:25:40 +10:30
ChangeLog-2019 ChangeLog rotation 2020-01-01 18:12:08 +10:30
ChangeLog-2020 ChangeLog rotation 2021-01-01 10:31:02 +10:30
ChangeLog-9103 Add copyright notices 2012-12-10 12:48:03 +00:00
collectorAPI.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
COPYING
COPYING3
ctf-api.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
demangle.h Sync libiberty sources with gcc master version 2026-01-07 11:33:07 +00:00
diagnostics.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
dis-asm.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
doubly-linked-list.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
dwarf2.def Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
dwarf2.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
dyn-string.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
environ.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
fibheap.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
filenames.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
floatformat.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
fnmatch.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
fopen-bin.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
fopen-same.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
fopen-vms.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
gcc-c-fe.def Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
gcc-c-interface.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
gcc-cp-fe.def Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
gcc-cp-interface.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
gcc-interface.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
getopt.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
hashtab.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
hp-symtab.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
leb128.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
libcollector.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
libfcollector.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
libiberty.h Sync libiberty sources with gcc master version 2026-01-07 11:33:07 +00:00
longlong.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
lto-symtab.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
MAINTAINERS Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
md5.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
oasys.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
objalloc.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
obstack.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
os9k.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
partition.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
plugin-api.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
safe-ctype.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
same-inode.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
sframe-api.h [SFrame-V3] bfd: ld: sframe: avoid unnecessary decoding of SFrame FREs at link time 2026-01-15 17:02:26 -08:00
sframe-internal.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
sframe.h [SFrame-V3] include: gas: libsframe: split FDE into idx and attr 2026-01-15 17:02:27 -08:00
sha1.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
simple-object.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
sort.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
splay-tree.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
symcat.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
timeval-utils.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
vtv-change-permission.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
xregex.h merge from gcc 2011-07-25 17:11:48 +00:00
xregex2.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
xtensa-config.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
xtensa-dynconfig.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
xtensa-isa-internal.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
xtensa-isa.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30