[PATCH v2 0/6] gas: Add support for LLVM addrsig and addrsig_sym.

Tatsuyuki Ishi ishitatsuyuki@gmail.com
Thu Jun 23 15:13:48 GMT 2022


LLVM's addrsig extension [1] allows the compiler to pass on information
about whether a symbol's address is taken to the linker, which in turns
use this info to perform (safe) Identical Code Folding optimization at
link-time.

This patch adds support for the relevant LLVM assembler directives,
which is a prerequisite for GCC support of the feature.

v2 includes patch to objcopy and ld -r to discard the .llvm_addrsig
section, in order to prevent linkers to get corrupted input now that
the SH_LINK heuristic they use is supplied with the proper value.

Thanks Alan Modra, Fangrui Song and Jan Beulich for reviewing the last
revision of the patch.

[1]: https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table





More information about the Binutils mailing list