Where is TypeInfo_Class.m_init set

kinke noone at nowhere.com
Tue Jul 31 20:45:11 UTC 2018


Sorry, scratch that, I forgot the `extern` before the dummy 
global. After fixing that, I didn't quickly find a solution for 
referencing the symbol in the .data.rel.ro section (LLVM asm, 
e.g., `void* getInit() { return __asm!(void*)("movq 
test.C.__init, %rax", "={rax}"); }` doesn't work either).

The compiler could emit the init symbol as regular global for 
`-betterC` though.

---

This issue could also be tackled in the D ctor of the extern(C++) 
class, by injecting the blit before the actual ctor body. C++ 
code wouldn't have to take care about that D-interop 
incompatibility anymore (independent of -betterC).


More information about the Digitalmars-d-learn mailing list