This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld auto-import


> >Seems to me the auto-import feature of ld is extremely broken; a separate
> >DLL reference seems to be made for every auto-imported symbol. It's hard
to
> >describe, but look at the output from Dependancy Walker to see what I
mean.
> >Note: dependancy walker falls over on a whole load of Cygwin DLLs for
this
> >very reason :-(
>
> That means there is a different way possible to reference
> symbols?  Would that speed up the loading of symbols?
>
> BTW, which version of ld are you using?
>
> And what do you suggest to change in the code base to get
> around this 'problem'?
>
> The better place to discuss this issue is the binutils list (I
> guess).
>
> What is 'dependancy walker', is it available for download
> somewhere or what do I need to buy to get it?
The Dependancy Walker (depends.exe) is part of the Platform SDK which you
get with MSVC++ or you can download from MSDN.

I don't know anything about ld internals, but I observed that normally, for
Windows executable files, there is one entry for each DLL the executable
file is dependant upon and for each DLL there is a list of imports from that
DLL that need to be patched up. ld, on the other hand, under some
circumstances ends up creating a separate DLL entry for each function that
is imported. I don't know whether this is a side effect of the way object
files are merged.
To give you an idea of how many superfluous entries there are,
cygkdecore-3.dll has 8564 references to qt-2-3.dll. The attached file
demonstrates the problem. Notice how there is one entry for qt-2-3.dll at
the top with a number of imported symbols in it. Then under that there are
8563 entries, all for qt-2-3.dll again, each with a single symbol under it.
These symbols, I believe, are the ones imported using the auto-import
mechanism, although I may be wrong. These symbols should be merged and
appear under a single qt-2-3.dll entry.

I am using GNU ld version 2.11.90. I think it's the version from the
kde-cygwin sourceforge page.
The attached output was generated using dumpbin.exe from MSVC++.

Regards
Chris

Attachment: cygkdecore-3.dll.info.gz
Description: GNU Zip compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]