This is the mail archive of the binutils@sourceware.org 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: Need help figuring out DLL load problem


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


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