This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PE-COFF and import tables
On Sunday 10 May 2009 17:09:53, Vincent R. wrote:
> Personnaly I made my choice and I know which version is better.
> But maybe there is something wrong in the way of exporting variables, or
> maybe
> there is good reason to do like that.
It looks like PE Explorer screenshots, but I'm not sure.
It seems like what would happen if you are auto-importing
those variables in the "gnu" case. This would
happen if you missed adding __declspec(dllimport) somewhere
where you're referencing those variables.
Each auto-import reference to a variable contributes one
of those "extra" import descriptors. See the top of
ld/pe-dll.c for gory details.
Didn't the linker warn about auto-importing? Something like:
Info: resolving foo by linking to __imp_foo (auto-import)
... or is it the case were we don't warn anymore? Try
linking with --disable-auto-import (-Wl,--disable-auto-import
if linking with gcc instead of ld).
--
Pedro Alves