manual memory management

Benjamin Thaut code at benjamin-thaut.de
Wed Jan 9 10:57:16 PST 2013


Am 09.01.2013 16:49, schrieb Andrei Alexandrescu:
> On 1/9/13 4:25 AM, Benjamin Thaut wrote:
>> The compiler is not shared-lib ready. At least not on windows. It does
>> not support exporting data symbols. E.g.
>>
>> export uint g_myGlobal;
>>
>> This is mostly a problem for "hidden" data symbols, like vtables, module
>> info objects, type info objects and other stuff D relies on.
>
> Are there bugzilla entries for this?
>
> Andrei

Yes its pretty old too. If you read through the discussion in the ticket 
and through the code Rainer Schuetze provided you will have a list of 
all the issues that need to be fixed for shared dlls to work:
http://d.puremagic.com/issues/show_bug.cgi?id=4071

In the following patch:
http://d.puremagic.com/issues/attachment.cgi?id=601&action=edit
Rainer Schuetze does manual patching for data symbols. But this is 
hardcoded to only work for his phobos shared dll. The function it is 
done in is called dll_patchImportRelocations. If I understand DLLs 
correctly this should usually be done by the import library that is 
created by the compiler for a shared dll. Maybe Rainer can shed some mor 
light on this.

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list