delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/09/27/15:25:04

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: <199909271924.OAA11550@mercury.xraylith.wisc.edu>
To: Richard <hicklinr AT mcd DOT alcatel DOT be>
cc: cygwin cygwin <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: ld or gcc failing?
In-Reply-To: Your message of "Mon, 27 Sep 1999 09:48:01 +0200."
<37EF2131 DOT B869FADF AT mcd DOT alcatel DOT be>
Date: Mon, 27 Sep 1999 14:24:21 -0500
From: Mumit Khan <khan AT thor DOT xraylith DOT wisc DOT edu>

Richard <hicklinr AT mcd DOT alcatel DOT be> writes:
> I must ask: what is relocatable output actually for (that can't be provided b
> y
> archives)?
> (sorry: this is now off topic).

Incremental linking allows you to "partially" linked a set of object 
modules and then use that as the source to further linking. Even though 
it may seem to the same as a static archive of object files, it is however 
quite different than archives (which is what "ar" creates).

Here's a short snippet from linker docs:

`-r'
`--relocateable'
     Generate relocatable output--i.e., generate an output file that
     can in turn serve as input to `ld'.  This is often called "partial
     linking".  As a side effect, in environments that support standard
     Unix magic numbers, this option also sets the output file's magic
     number to `OMAGIC'.  If this option is not specified, an absolute
     file is produced.  When linking C++ programs, this option *will
     not* resolve references to constructors; to do that, use `-Ur'.

Essentially -r creates an executable of sorts that contains the relocation
information so that you can use it in subsequent linking. It also does not
lay out the common symbols, and does not complain if there are undefined
symbols during this relocatable link.

More confused yet ;-?

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