This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: speclib vs. -lc trouble.
Christopher Faylor wrote:
>> Starting to look like a real BFD problem.
>
> Yes, it was definitely some sort of binutils problem. When I started
> playing around I was getting error messages relating to the wrong
> library. I'd make a change to libc.a and get an error relating to
> libcygwin.a. That was enough of a clue to realize that these special
> libraries need to look a lot less like import libraries.
Well well well... I think I got to the root of it:
ld/emultempl/pe.em:gld_${EMULATION_NAME}_after_open()
/* This next chunk of code tries to detect the case where you have
two import libraries for the same DLL (specifically,
symbolically linking libm.a and libc.a in cygwin to
libcygwin.a). In those cases, it's possible for function
thunks from the second implib to be used but without the
head/tail objects, causing an improper import table. We detect
those cases and rename the "other" import libraries to match
the one the head/tail come from, so that the linker will sort
things nicely and produce a valid import table. */
That describes the problem we had in the first place, and should have
prevented it. I think it's also where my libraries are getting swapped over.
What's the fix you're testing?
cheers,
DaveK