www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/09/24/17:32:42

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <199909242130.QAA25818@mercury.xraylith.wisc.edu>
To: "Michael K. Elwood" <mkelwood AT qsicorp DOT com>
cc: "cygwin cygwin" <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: ld or gcc failing?
In-Reply-To: Your message of "Fri, 24 Sep 1999 14:36:10 MDT."
<08da01bf06cc$6fd2bc40$656aadcf AT qsicorp DOT com>
Date: Fri, 24 Sep 1999 16:30:19 -0500
From: Mumit Khan <khan AT thor DOT xraylith DOT wisc DOT EDU>

"Michael K. Elwood" <mkelwood AT qsicorp DOT com> writes:
> > I have the following problem:
> >
> > I compiled many C modules, and I'm using `ld' to build a '.a' library file
> > and it fails with the following error:
> > <<
> > rm -f Dobj3.a
> > ld -r -o Dobj3.a do243d.o re247d.o in245d.o bo251d.o ch249d.o po253d.o
> etc. etc.
> 
> ar is the correct tool for creating libraries (archives). ld won't do what
> you want here. Don't forget to run ranlib on your library when you are done
> creating it (if you want it to be indexed.) Hope this helps.
> 

You missed the '-r' in Emmanuel's bug report. He's trying to build a 
relocatable output, which is quite different from an archive that ar
builds.

The problem here, and Emmanuel has already filed a bug report on this,
is that GNU as/ld on x86-win32 can only handle 16-bit relocations, and 
some machine-generated code can fail at link time thanks to that. MSVC
gets around it with some magic (I haven't looked at how the newer versions
of MSVC handle this, but presumably it's cleaner than it used to be). 
If I remember correctly, MSVC notices what needs to be relocated and 
what does not, and that's why it can handle larger number of relocs in 
a single object file.

Unless someone fixes it, it'll remain a bug.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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