[PATCH] D17242: [ELF] - Linkerscript KEEP command.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 02:27:47 PST 2016

>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

 .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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160222/292304ea/attachment.html>

More information about the llvm-commits mailing list