[cfe-dev] [PATCH] plugin problem on Windows

Michael Spencer bigcheesegs at gmail.com
Sun Apr 3 19:25:16 PDT 2011


On Sun, Apr 3, 2011 at 7:49 PM, Óscar Fuentes <ofv at wanadoo.es> wrote:
> Michael Spencer <bigcheesegs at gmail.com> writes:
>
>>> Anyways that's pointless because Clang (and LLVM) lacks the necessary
>>> directives (exports file or declspec(dllimport|dllexport) on
>>> declarations.) MinGW can do up to some point without those, because
>>> binutils supports marking everything as exported, but VC++ requires
>>> explicit directives.
>>
>> It's actually possible to do this without explicit directives by
>> making use of link -dump to dump the symbol table to an export file
>> and relink all the static libs into a giant DLL that exports
>> everything. At one point I was working on this, but got pulled into
>> other things.
>
> There is a limit of 2^16 for the number of symbols you can list on a
> export file. I know because you told me that.
>
> I tried to export one library at a time instead of creating a single big
> one, but some libraries exceeds the 2^16 limit.
>

I was actually wrong. There is a 2^16 limit when using indexed exports
(which is much faster at load time). If you don't use them, then the
limit has an upper bound of (2^32) - 1.

- Michael Spencer




More information about the cfe-dev mailing list