[Issue 4071] Missing support to share memory and objects between DLLs and executable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 17 23:56:30 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=4071


dawg at dawgfoto.de changed:

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


--- Comment #11 from dawg at 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: -------


More information about the Digitalmars-d-bugs mailing list