[PATCH v3 0/2] [ld] Add library-related features for ld -r
Eyal Itkin
eyal.itkin@gmail.com
Fri Oct 17 17:50:09 GMT 2025
Introduce new CLI flags for "ld -r" to allow users to
transform it from a bundle of plain object-code files
into a library-like object-code file.
The full discussion about the format is available in
the generic-abi group that is responsible for the ELF
standard. Specifically, the summarized architecture can
be found here:
https://groups.google.com/g/generic-abi/c/sT25-xfX9yc/m/J9SIthF4BgAJ
Eyal Itkin (2):
[ld] Allow symbol visibility support for ld -r
[ld] Allow relocation finalization for ld -r
bfd/elf64-x86-64.c | 57 ++++++++++++++++++++++++-
bfd/elflink.c | 42 ++++++++++++------
include/bfdlink.h | 6 +++
ld/ld.h | 6 +++
ld/ldlex.h | 2 +
ld/lexsup.c | 20 +++++++++
ld/testsuite/ld-elf/finalize_locals.s | 23 ++++++++++
ld/testsuite/ld-elf/finalize_locals1.d | 12 ++++++
ld/testsuite/ld-elf/finalize_locals2.d | 13 ++++++
ld/testsuite/ld-elf/finalize_locals3.d | 3 ++
ld/testsuite/ld-elf/localize_hidden.map | 7 +++
ld/testsuite/ld-elf/localize_hidden.s | 19 +++++++++
ld/testsuite/ld-elf/localize_hidden1.d | 11 +++++
ld/testsuite/ld-elf/localize_hidden2.d | 11 +++++
ld/testsuite/ld-elf/localize_hidden3.d | 11 +++++
ld/testsuite/ld-elf/localize_hidden4.d | 3 ++
16 files changed, 232 insertions(+), 14 deletions(-)
create mode 100644 ld/testsuite/ld-elf/finalize_locals.s
create mode 100644 ld/testsuite/ld-elf/finalize_locals1.d
create mode 100644 ld/testsuite/ld-elf/finalize_locals2.d
create mode 100644 ld/testsuite/ld-elf/finalize_locals3.d
create mode 100644 ld/testsuite/ld-elf/localize_hidden.map
create mode 100644 ld/testsuite/ld-elf/localize_hidden.s
create mode 100644 ld/testsuite/ld-elf/localize_hidden1.d
create mode 100644 ld/testsuite/ld-elf/localize_hidden2.d
create mode 100644 ld/testsuite/ld-elf/localize_hidden3.d
create mode 100644 ld/testsuite/ld-elf/localize_hidden4.d
--
2.31.1.windows.1
More information about the Binutils
mailing list