This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Relocatable dll problems when generated by ld
- To: jont at harlequin dot co dot uk
- Subject: Re: Relocatable dll problems when generated by ld
- From: tvoverbe at wk dot estec dot esa dot nl (Ton van Overbeek)
- Date: Fri, 11 Jul 97 09:27:24 +0200
- Cc: gnu-win32 at cygnus dot com
Jon,
Your problem with your improperly build threads.dll by ld smells like the infamous
problem of an improperly terminated import section.
Have you added the extra file fixup.c to your sources ?
--------------------------------- fixup.c -------------------------------
/* This is needed to terminate the list of inport stuff */
/* Copied from winsup/dcrt0.cc in the cygwin32 source distribution. */
asm(".section .idata$3\n" ".long 0,0,0,0, 0,0,0,0");
-------------------------------------------------------------------------
Without this you will get listings like you got from
Microsoft's VC dumpbin.
Also your previous problem of converting a Microsoft import library (.lib)
file to a cygwin import library (libxxx.a) I would have done differently:
First produce a .def file from the .lib file. I do not know off hand if
the Microsoft LIB allows you to do this automatically.
Otherwise you would have to use nm, strip the leading underscores and
manually edit it to a proper .def file. Note that dlltool does not like
the .def file to start with e.g. 'LIBRARY kernel32.lib'. It wants line 1
to be 'EXPORTS'.
Then with the .def file produce the import library with
dlltool --def <name>.def --output-lib <name>.a
Hope this helps a bit.
Ton van Overbeek, tvoverbe@wk.estec.esa.nl
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".