[patch] Emit aliases for more constructors (V2)

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Oct 11 14:17:28 PDT 2013


After spending some time figuring out what the actual restrictions ELF
puts on alias I think this new patch is correct.

What the previous one was getting wrong is that sometimes it would
output just the base destructor. If we are using aliases and
implementing weak functions with comdats, we have to make sure every
translation unit emits comdats with the same symbols. If we don't, the
linker can decide to keep a copy that has only the base destructor and
the link gets an undefined reference to the complete destructor.

I have tested the patch by using a patched clang to build a debug
version of clang.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 10604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131011/281a6700/attachment.obj>


More information about the cfe-commits mailing list