]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
bfd, ld: allow the disabling of CTF deduplication; BTF linking
authorNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 20:28:25 +0000 (21:28 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 20:32:35 +0000 (21:32 +0100)
commit1cea8a8ce757eb5e99f228abdf73cd62578b7745
tree9c04db3f0f90ba21ec4000e4ff4a87577b3f16ea
parent1ec572d423672c5fa9f2d214c4dee81f26b4d1dc
bfd, ld: allow the disabling of CTF deduplication; BTF linking

This first half of ld support for BTF deduplication adds a facility to GNU
ld and BFD to entirely disable CTF or BTF deduplication via the new
--disable-ctf-dedup linker option, and (slightly entangled with it) modifies
the existing BFD CTF support so that it can also deduplicate BTF.
Determining whether deduplication is disabled when all you have is a section
requires a bit of digging around and the proxying of of _bfd_get_link_info
into bfd-elf.h via a new _bfd_elf_get_link_info, to dodge include ordering
problems.

(Note that BTF deduplication support is not yet complete: in particular,
relocs into BTF sections don't get handled at all yet.)
bfd/elf-bfd.h
bfd/elf.c
bfd/elflink.c
include/bfdlink.h
ld/ld.texi
ld/ldlang.c
ld/ldlex.h
ld/lexsup.c