[dmd-internals] module .ctors
Martin Nowak
dawg at dawgfoto.de
Thu Dec 1 13:02:02 PST 2011
Walter, can you remember what the additional return instruction in front
of the module info ctor is for.
/* ret
* codeOffset:
* pushad
* mov EAX,&ModuleReference
* mov ECX,_DmoduleRef
* mov EDX,[ECX]
* mov [EAX],EDX
* mov [ECX],EAX
* popad
* ret
*/
After relocation in a shared library the ctor entry points to the first
ret instruction (probably due to alignment?) instead of codeOffset. Is
this a hack to disable certain modules?
martin
More information about the dmd-internals
mailing list