[LLVMdev] [lld] adding deadStrip() to undefined Atoms

Shankar Easwaran shankare at codeaurora.org
Tue Aug 27 11:35:26 PDT 2013


Hi Nick,

On 8/27/2013 12:45 AM, Nick Kledzik wrote:
> On Aug 26, 2013, at 10:20 PM, Shankar Easwaran wrote:
>> Can we add deadStrip() to undefinedAtoms as well ?
>>
>> This will enable to choose whether we want to set the property deadStripNormal or deadStripNever on them.
>>
>> Also I think it will be cleaner for atoms to be added to deadStripRoot set using a single API.
> Can you give more more background on this?  When would you want and undef that causes the whatever defined atom replaces it to be never dead stripped?
We have these options

a) -entry <symbolname>
b) -init <symbolname>
c) -fini <symbolname>

The atoms created for this shouldnot be dead stripped, as there is an 
explicit reference from the command line.

The other options such as

a) --defsym newsymbol = oldsymbol + 100
b) --wrap newsymbol

have the other effect that if there is no reference to the symbols 
/newsymbol, and __wrap_newsymbol, /the atoms are removed.

Also rather than having the symbols seperately considered in the Driver, 
on whether we want to add to the deadStripRoot set or not, we can just 
use the attributes on the atom to place
them in the deadStripRoot set / not.

On the similiar lines, I think it should become an atom property itself 
(having absoluteAtoms also have this property set) ?

What do you think ?

Thanks

Shankar Easwaran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130827/1ce82f84/attachment.html>


More information about the llvm-dev mailing list