[llvm-commits] Absolute symbols with local binding

Nick Kledzik kledzik at apple.com
Thu Nov 1 16:49:53 PDT 2012


On Nov 1, 2012, at 4:41 PM, Hemant Kulkarni wrote:

> 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?
Yes.  That is correct.  Please add that fix and a yaml based test case that exercises it.


-Nick

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


More information about the llvm-commits mailing list