[PATCH] D17242: [ELF] - Linkerscript KEEP command.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 22 10:41:56 PST 2016
On 22 February 2016 at 05:27, George Rimar <grimar at accesssoftek.com> wrote:
>>Can you test with ld.bfd? Gold's behavior seems almost like it could be an
>> accident. If ld.bfd disagrees about this then we might need to pay extra
>> attention here (and perhaps >want to follow ld.bfd's semantics since ld.bfd
>> is much more prevalent).
>>
>>-- Sean Silva
>
> ld.bfd behaves differently. For the script below
>
> SECTIONS {
> .temp : { *(.keep) }
> .keep : { KEEP(*(.keep)) }
> }
>
> it creates .temp section like if *(.keep) would be specified to have KEEP
> flag.
> But I wonder - does such scripts are really used in real life ? For me it
> seems to be a bug in script, am I mistaken ?
> I guess if gold and bfd still have the different behavior then probably
> feature not commonly used. lld behavior is equal to gold now, it is natural,
> I mean we did nothing special to achieve that. I am not sure if we should
> really 'fix' that.
Agreed, but please add a note to the test saying that it checks lld's
current behaviour and that it matches gold, but that bfd is different.
That way anyone looking at it knows it can be changed if the other
case becomes natural for some reason.
Cheers,
Rafael
More information about the llvm-commits
mailing list