DIP45: fixing the dllimport/dllexport issue

Rainer Schuetze r.sagitario at gmx.de
Sun Sep 22 23:30:26 PDT 2013



On 19.09.2013 21:42, Benjamin Thaut wrote:
> Am 19.09.2013 20:24, schrieb Rainer Schuetze:
>>
>>
>> On 19.09.2013 13:58, Benjamin Thaut wrote:
>>> Am 12.09.2013 07:54, schrieb Rainer Schuetze:
>>>>
>>>>
>>>> This sounds interesting. Stripping an existing library isn't even
>>>> needed
>>>> because it is normally never created with exports anyway (-lib implies
>>>> that no exports are created to start with). Stripping object files
>>>> might
>>>> be necessary, though, in case they have been built separately with -c.
>>>
>>> Can't we get around stripping object files by always using -c together
>>> with -lib in case the object file is supposed to go into a static
>>> library?
>>
>> That could work, though it has it's own set of side effects, like
>> splitting a module into pseudo modules per function which also ruins
>> running unittests built into the library. Building modules with -c and
>> combining these into a library afterwards avoids this.
>
> Ah ok, I didn't know that. How much work would it be to implement object
> file stripping? I'm not confident I can do this.
>

I just checked the OMF and COFF docs: it should be possible to wipe out 
the export records without having to rewrite the object files, so it's 
not too involved. Don't know about ELF or mach-o, though.


More information about the Digitalmars-d mailing list