[cfe-dev] Fix for symbol conflict caused by aliases

David Chisnall csdavec at swansea.ac.uk
Sat Aug 15 06:43:43 PDT 2009


Hi,

This patch adds some name mangling to the GNU runtime's selector alias  
handling.  Without it, selectors that have the same name as C symbols  
cause those symbols to be renamed, breaking linking (for example, a  
selector named "close" causes the close() function to be renamed  
@close123, and the linker to complain that _close123 is not a valid  
symbol).  This seems like it might be a bug in LLVM -  given a  
conflict between an internal and external global the internal one  
should be renamed - but this patch works around the behaviour.

Note that this diff is taken after my other diff, so if that has not  
been applied it will need to be manually merged (which should be easy,  
since it only changes two lines).

David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.diff
Type: application/octet-stream
Size: 1114 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090815/3e78ad9e/attachment.obj>


More information about the cfe-dev mailing list