delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2005/12/01/07:37:07

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Thu, 1 Dec 2005 07:36:38 -0500
Message-Id: <200512011236.jB1CacN1031610@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <a85to11j64achunp58gqg8alvfsh0i3j89@4ax.com> (message from
Radical NetSurfer on Thu, 01 Dec 2005 01:22:35 -0500)
Subject: Re: LDD utility
References: <u83so1l8ja1l725e9lu7ll94corqkjq5r5 AT 4ax DOT com> <200511302046 DOT jAUKkENl023371 AT envy DOT delorie DOT com> <a85to11j64achunp58gqg8alvfsh0i3j89 AT 4ax DOT com>
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> ObjDump might be able to tell us what modules are expected,
> but if I understand the process correctly, it does not actually
> specify _from_ which library, by name, the linker needs to grab
> the external references from....

You want the -Map option of the linker.  Read the "ld" info pages.

> When gcc (djgpp) compiles and creates each object file, are the
> names of the external references just "tossed in as they are
> encountered",

Pretty much.

> My guess is no such task is performed, just that each external
> reference is tossed in, and the linker has to do its best by being
> manually handed the libraries and repeatedly scanning through
> obj's and lib's until matches are resolved.

No, not repeatedly.  That's why the order of libraries on the command
line is important.

> is there any paper/treatis on this process anywhere?  THANKS.

The linker manual.  "info ld".

- Raw text -


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