April 11, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4071



--- Comment #10 from Rainer Schuetze <r.sagitario@gmx.de> 2010-04-11 05:52:26 PDT ---
Circular dependencies between binaries are detected at link time, because you'll have the circular reference issue when creating the DLLs.

moduleCtor() checks whether imported modules are in the same binary, and if not, intializers are not called assuming that they are initialized already, because the DLL they are in is already fully loaded.

The proposed implementation is meant to produce a shared phobos.dll. If you want to apply it to other libraries, some functions need to be extended (especially patching relocations to data values which currently works only for a single DLL).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 18, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4071


dawg@dawgfoto.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dawg@dawgfoto.de


--- Comment #11 from dawg@dawgfoto.de 2012-01-17 23:56:24 PST ---
I have recently done a ModuleInfo refactoring along this line.

I'd like to avoid having to link in a static library.
The planned ELF mechanism works like the following:

 - The compiler emits a static init function into each
   object, library or executable. This function is a
   comdat so every DLL or EXE will have a single init
   function.

 - _minfo_beg/_minfo_end and _deh_beg/_deh_end are made
    static symbols.

 - The init function registers it's modules/EH tables
   with a global function in druntime. There we create
   an entry and store additional data like TLS index
   and writeable segments for GC.

 - The module initialization must now only iterate over
   all dlls and initialize them in the order of registration.

If we can figure out how to create a static init function
the same mechanism should work for Windows.
By splitting registration and initialization we should
be able to perform module construction outside DllMain of.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2
Next ›   Last »