]> git.ipfire.org Git - thirdparty/gcc.git/commit - Makefile.def
bfd: linker: merge .sframe sections
authorIndu Bhagat <indu.bhagat@oracle.com>
Tue, 15 Nov 2022 23:07:04 +0000 (15:07 -0800)
committerArsen Arsenović <arsen@gcc.gnu.org>
Mon, 7 Aug 2023 20:59:42 +0000 (22:59 +0200)
commitdab58c93634bef06fd289f49109b5c370cd5c380
tree65217d6ab035ee894ceb8af9b9e801f73cd1f346
parentdc17ceb3055f56aa3a59c6ef3ae32043d58502d1
bfd: linker: merge .sframe sections

The linker merges all the input .sframe sections.  When merging, the
linker verifies that all the input .sframe sections have the same
abi/arch.

The linker uses libsframe library to perform key actions on the
.sframe sections - decode, read, and create output data.  This
implies buildsystem changes to make and install libsframe before
libbfd.

The linker places the output .sframe section in a new segment of its
own: PT_GNU_SFRAME.  A new segment is not added, however, if the
generated .sframe section is empty.

When a section is discarded from the final link, the corresponding
entries in the .sframe section for those functions are also deleted.

The linker sorts the SFrame FDEs on start address by default and sets
the SFRAME_F_FDE_SORTED flag in the .sframe section.

This patch also adds support for generation of SFrame unwind
information for the .plt* sections on x86_64.  SFrame unwind info is
generated for IBT enabled PLT, lazy/non-lazy PLT.

The existing linker option --no-ld-generated-unwind-info has been
adapted to include the control of whether .sframe unwind information
will be generated for the linker generated sections like PLT.

Changes to the linker script have been made as necessary.

ChangeLog:

* Makefile.def: Add install dependency on libsframe for libbfd.
* Makefile.in: Regenerated.
Makefile.def
Makefile.in