This is used by __cxa_ataxit to determine the currently
executing DLL. Once we fully support DLLs this will need
to be set to some address within the DLL.
The ELF linker added support for this symbol here:
https://reviews.llvm.org/D33856
Differential D42024
[WebAssembly] Create synthetic __dso_handle symbol sbc100 on Jan 12 2018, 6:02 PM. Authored by
Details This is used by __cxa_ataxit to determine the currently The ELF linker added support for this symbol here:
Diff Detail
Event TimelineComment Actions Couldn't this just be in crtbegin.c? Then there wouldn't have to be custom linker logic for it. Comment Actions For background on this see: Comment Actions I'm not opposing to this patch, but I wonder if this is the best way of doing what you want to do in the new file format. We define __dso_handle symbol for ELF because the existing code expects the symbol. But since we don't have such existing code in wasm (am I correct?) I wonder if there's a different way. Comment Actions We do have existing code that depends on dso_handle in that clang will generate calls to cxa_atexit() passing __dso_handle as the third arg (see clang/lib/CodeGen/ItaniumCXXABI.cpp). |