dvyukov added a comment. In https://reviews.llvm.org/D39619#916666, @joerg wrote: > No, __cxa_atexit will always reference the DSO handle. That exists even in the main executable. Ack. Probably confused it with __cxa_finalize. Repository: rL LLVM https://reviews.llvm.org/D39619