[llvm-commits] Absolute symbols with local binding

Hemant Kulkarni khemant at codeaurora.org
Fri Nov 2 13:02:40 PDT 2012


Attached is the patch. I tried doing same with global symbols and they did
collide as expected. 

 

--

Hemant Kulkarni

khemant at codeaurora.org

Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
the Linux Foundation

 

From: Nick Kledzik [mailto:kledzik at apple.com] 
Sent: Thursday, November 01, 2012 6:50 PM
To: Hemant Kulkarni
Cc: 'Michael Spencer'; mariog at codeaurora.org; 'Sid Manning'; 'LLVM Commits';
'Shankar Easwaran'
Subject: Re: Absolute symbols with local binding

 

 

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/20121102/d9f6cbb8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: abs-scope.patch
Type: application/octet-stream
Size: 3214 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121102/d9f6cbb8/attachment.obj>


More information about the llvm-commits mailing list