This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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: Segmentation fault in ld


Hi Max,

Like I said, the Makefile is crappy. The point is not in the Makefile - if 
it were OK, ld wouldn't give any errors at all ;)

The point is that ld is segfaulting. I don't know whether it's specific to 
Cygwin, which is why I posted here first.

As nobody has been able to point me to a cause inside ld (yet), I'll do 
some the necessary digging myself when I have the time.

rlc

On Mon, 31 Mar 2003, Max Bowsher wrote:

> Ronald Landheer-Cieslak wrote:
> > Hello all,
> > 
> > I just discovered a bug in the current ld:
> > 
> > To repeat, just make sure there is no .libs in the current directory and
> > there is a minimal stub.cpp with at least one function. Run make with the
> > following makefile:
> > 
> > == BEGIN Makefile ==
> > all : stub.dll
> > 
> > .cpp.o :
> >         g++ -shared -Wall -Werror -g -c -o $@ $<
> > 
> > stub.dll : stub.o
> >         g++ -Wall -Werror -g -o $@ $^ \
> >         -Wl,--out-implib,.libs/$ at  dot a \
> >         -Wl,--output-def,.libs/$ at -def \
> >         -Wl,--export-all-symbols \
> > === END Makefile ===
> > 
> > ld will segfault trying to open .libs/stub.dll-def
> > 
> > The Makefile is slightly crappy, of course, but ld shouldn't segfault in
> > any case, IMHO.
> 
> True, but even if ld didn't segfault, your example is still broken:
> 
> .def files MUST end in ".def". Otherwise ld will not treat them as such.
> 
> > If this is in no way related to Cygwin, I'll send the same thing to the
> > Binutils list.
> > 
> > HTH
> > 
> > rlc
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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