DIP45: fixing the dllimport/dllexport issue

Martin Nowak code at dawg.eu
Fri Aug 30 05:41:50 PDT 2013


On 08/30/2013 12:50 PM, Rainer Schuetze wrote:
>> References from the data segment use absolute relocations.
>
> Just remembered that we don't have that in Windows, so if we want to
> mimick what C++ does, we'll have to generate initialization-code to be
> run at startup to fill in the proper pointers from the import table.

This is also done at runtime by the loader. The additional startup time 
is one reason why exporting data in ABIs is bad. The other is copy 
relocations for writeable data 
(http://docs.oracle.com/cd/E19082-01/819-0690/chapter4-84604/index.html).


More information about the Digitalmars-d mailing list