[PATCH 2/4] gas: Add support for LLVM addrsig and addrsig_sym directives on ELF.
Jan Beulich
jbeulich@suse.com
Wed May 25 07:49:50 GMT 2022
On 25.05.2022 08:42, Tatsuyuki Ishi via Binutils wrote:
> These are LLVM extensions for specifying address significance, i.e.
> if the symbols have their address taken, which is in turn used for
> the Identical Code Folding link-time optimization.
>
> For now, it's only implemented for the ELF platform; LLVM also supports
> COFF, but the format is not well documented and usage is not widespread.
>
> The addrsig directive signifies the assembler to emit the .llvm_addrsig
> section, which signals the linker that it's possible to do (safe) ICF on
> this object file.
>
> The addrsig_sym directive marks a symbol as address significant. In this
> patch, it's recorded with a boolean flag on the symbol. Later when the
> symtab is ready, we loop over the symbols and construct the addrsig
> section with indices of those symbols.
Why two directives? IOW what's the point of silently ignoring
.addrsig_sym when there's no .addrsig anywhere? And such a toggle-on
directive likely would want to allow expressing also (or even only)
via a command line option.
Jan
More information about the Binutils
mailing list