delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/31/17:14:52

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <018101c2f7d2$d6cff160$f457893e@pomello>
From: "Max Bowsher" <maxb AT ukf DOT net>
To: "Ronald Landheer-Cieslak" <ronald AT landheer DOT com>, <cygwin AT cygwin DOT com>
References: <Pine DOT LNX DOT 4 DOT 44 DOT 0303311603520 DOT 14082-100000 AT localhost DOT localdomain>
Subject: Re: Segmentation fault in ld
Date: Mon, 31 Mar 2003 23:00:07 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

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/$@.a \
>         -Wl,--output-def,.libs/$@-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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019