[llvm-commits] make utils/GenLibDeps.pl ignore 'D' lines from nm

Nick Lewycky nicholas at mxc.ca
Sun Feb 15 15:17:18 PST 2009


Duncan Sands wrote:
> Hi Nick,
> 
>> GenLibDeps is showing that .so files all depend on each other. 
>> Technically, this hasn't caused a problem yet because neither libLTO.so 
>> nor libHello.so fir the 'libLLVM* or LLVM*' file convention, so they're 
>> both ignored by GenLibDeps entirely.
>>
>> libLLVMgold is not so lucky. GenLibDeps concludes that everybody depends 
>> on libLLVMgold since it shows a 'D' record for __dso_handle.
> 
> you are linking using gold, right?  The usual GNU linker marks this as 'd',
> i.e. an internal symbol.  I've reported this to the gold devs [Bug gold/9836].

Ah! To my surprise I have been running with gold.

>> In my 
>> Debug/lib/ directory, the only D records come from .so files. The 
>> attached patch makes GenLibDeps ignore all D entries, and removes the 
>> apparent cycle encountered when building the gold plugin.
>>
>> Comments?
> 
> How about just ignoring __dso_handle?  This might be enough to work
> around the gold bug.  I don't much like the idea of ignoring all 'D'
> symbols (externally visible globals with initial value).

That works for me. I've attached the patch, let me know if it works for 
you and I'll commit it!

Nick

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ignore-dso-handle.patch
Type: text/x-diff
Size: 1072 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090215/a152ba4e/attachment.patch>


More information about the llvm-commits mailing list