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

Attachment: t.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to