[PATCH 2/4] gas: Add support for LLVM addrsig and addrsig_sym directives on ELF.

Jan Beulich jbeulich@suse.com
Wed May 25 08:34:07 GMT 2022


On 25.05.2022 09:58, Tatsuyuki Ishi wrote:
>> Why two directives? IOW what's the point of silently ignoring
>> .addrsig_sym when there's no .addrsig anywhere?
> 
> Because addrsig is an opt-in mechanism. A file with only .addrsig means that
> none of the symbols are address significant, while a file without is treated
> as if all symbols were.

Oh, right.

> The silent ignore behavior is not ideal, but it could be added later. The
> primary target of this patch is compiler generated output.

Is there a reason .addrsig_sym can't suffice to enable emission of
the section without any .addrsig?

>> And such a toggle-on
>> directive likely would want to allow expressing also (or even only)
>> via a command line option.
> 
> How would that work? That leads to two kind of end results, 1. mark *all*
> symbols as address-insignificant (if there's no addrsig_sym directives)
> or maybe 2. toggle off llvm_addrsig support (but why?).

I find the question odd. How would a command line option be different
from use of the directive? (But yes, with the directive alone being
meaningful I can see that "only" via command line option isn't very
nice. But for assembler source having the alternative of a command
line option would look useful to me, as then one wouldn't need to
repeat the directive in every source file.)

Jan



More information about the Binutils mailing list