[llvm-commits] Absolute symbols with local binding

Hemant Kulkarni khemant at codeaurora.org
Thu Nov 1 16:41:32 PDT 2012


Hi Nick,

 

I am linking a code that has an absolute symbol with local scope binding
type in ELF. This is valid as per ABI, but when the lld-core calls resolver,
it fails since the SymbolTable::addByName reaches a condition of NCR_Error
in collide(). It seems like the absolute symbols are always treated like
global symbols and in Resolver::doAbsoluteAtom never checks for scope. I
remember Sidney adding scope() to AbsoluteAtom class sometime back. I think
it is only used in reader/writer and not wired into the lld/Core. 

I suggest checking scope of absolute atoms as well and add to SymbolTable
only if their scope is not scopeTranslationUnit. What do you think?

 

-Hemant

 

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


More information about the llvm-commits mailing list