What is __start___minfo?

David Nadlinger code at klickverbot.at
Wed Mar 14 17:38:59 UTC 2018

On 14 Mar 2018, at 7:13, Joakim via digitalmars-d-ldc wrote:
> That accounts for how they're normally added, but I'm unsure of how 
> they're normally accessed by D code, ie where they're required such 
> that lli looks for them.

They are used in the global constructors implicitly created by the 
compiler to register the modules from each D executable/shared library 
with the runtime (passed to _d_dso_registry in rt.sections_elf_shared).

You can disable generation of ModuleInfo with LDC_no_moduleinfo (or 
-betterC), but then things depending on the runtime (like static this()) 
won't work. What the "proper" solution is depends significantly on how D 
modules (and global data in general) are mapped to your interpreter/JIT 
in terms of lifetime/reloading/…

  — David

More information about the digitalmars-d-ldc mailing list