This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Need help figuring out DLL load problem
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: danny dot backx at scarlet dot be
- Cc: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, binutils at sourceware dot org
- Date: Wed, 05 Aug 2009 20:03:28 +0100
- Subject: Re: Need help figuring out DLL load problem
- References: <1248970879.5537.415.camel@pavilion> <4A71DFC8.6060908@gmail.com> <1248976791.5537.420.camel@pavilion> <4A71FAF5.5000908@gmail.com> <1249215774.5537.438.camel@pavilion> <4A78AE56.2060300@gmail.com> <1249494851.5537.503.camel@pavilion>
Danny Backx wrote:
> How does collect2 (this is ld, right?)
collect2 is to ld as gcc is to cc1, it's a driver. Add '-v' to the collect2
command line you pasted to see the exact ld command line.
> create this libstdc++.dll.a ? The
> message "Creating library file" appears to come from
> binutils/ld/pe-dll.c .
Look around this bit in make_one():
> /* Include the jump stub section only if it is needed. A jump
> stub is needed if the symbol being imported <sym> is a function
> symbol and there is at least one undefined reference to that
> symbol. In other words, if all the import references to <sym> are
> explicitly through _declspec(dllimport) then the jump stub is not
> needed. */
It gets called from pe_dll_generate_implib() according to what it's parsed
from the .def file. Check that dlltool hasn't bogusly emitted the .def file
listing as a DATA export; otherwise the problem may be in ld's parsing and
handling of it.
cheers,
DaveK