[PATCH] D83603: [lld-macho] Support __dso_handle for C++
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 10 18:26:53 PDT 2020
int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The C++ ABI requires dylibs to pass a pointer to __cxa_atexit which does
e.g. cleanup of static global variables. The C++ spec says that the pointer
can point to any address in one of the dylib's segments, but in practice
ld64 seems to set it to point to the header, so that's what's implemented
here.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83603
Files:
lld/MachO/Driver.cpp
lld/MachO/SymbolTable.cpp
lld/MachO/SymbolTable.h
lld/MachO/Symbols.cpp
lld/MachO/Symbols.h
lld/MachO/SyntheticSections.h
lld/MachO/Writer.cpp
lld/test/MachO/dso-handle-no-override.s
lld/test/MachO/dso-handle.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83603.277187.patch
Type: text/x-patch
Size: 9521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200711/fea3a64e/attachment-0001.bin>
More information about the llvm-commits
mailing list