public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* why is an archive member linked in ?
@ 1997-12-29 19:09 Philippe De Muyter
  1997-12-29 19:24 ` DJ Delorie
  1997-12-29 20:09 ` Ian Lance Taylor
  0 siblings, 2 replies; 4+ messages in thread
From: Philippe De Muyter @ 1997-12-29 19:09 UTC (permalink / raw)
  To: binutils mailing list

I need to answer the following ld-related question : why is some specific
archive-member linked in ?  Is there a gld option available 
or some other more intricated way  to answer that question ?

In the specific case I encountered, removing the module from the archive
made my link command succeed, while with the module in the archive my
link command failed because of some unresolved symbols in the module
that got linked in.

Thanks in advance

Philippe De Muyter

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: why is an archive member linked in ?
  1997-12-29 19:09 why is an archive member linked in ? Philippe De Muyter
@ 1997-12-29 19:24 ` DJ Delorie
  1997-12-29 20:01   ` Philippe De Muyter
  1997-12-29 20:09 ` Ian Lance Taylor
  1 sibling, 1 reply; 4+ messages in thread
From: DJ Delorie @ 1997-12-29 19:24 UTC (permalink / raw)
  To: phdm; +Cc: gas2

> In the specific case I encountered, removing the module from the archive
> made my link command succeed, while with the module in the archive my
> link command failed because of some unresolved symbols in the module
> that got linked in.

Sometimes, there might be more than one object that resolves a
specific symbol.  If you take one out, the other gets used, and that
changes everything.

For example, DJGPP has two math libraries.  One (libm.a) has a
complete set of conforming (but slightly slower) functions, and the
other (in libc.a) is smaller and faster, but less complete and less
conforming.  If you link in libm.a, you get that set, but if you leave
it out, the ones in libc.a get used.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: why is an archive member linked in ?
  1997-12-29 19:24 ` DJ Delorie
@ 1997-12-29 20:01   ` Philippe De Muyter
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe De Muyter @ 1997-12-29 20:01 UTC (permalink / raw)
  To: DJ Delorie; +Cc: gas2

> 
> 
> > In the specific case I encountered, removing the module from the archive
> > made my link command succeed, while with the module in the archive my
> > link command failed because of some unresolved symbols in the module
> > that got linked in.
> 
> Sometimes, there might be more than one object that resolves a
> specific symbol.  If you take one out, the other gets used, and that
> changes everything.
> 
> For example, DJGPP has two math libraries.  One (libm.a) has a
> complete set of conforming (but slightly slower) functions, and the
> other (in libc.a) is smaller and faster, but less complete and less
> conforming.  If you link in libm.a, you get that set, but if you leave
> it out, the ones in libc.a get used.
> 

Thanks.  I already know that but that's the (slow and ugly) method I use
to find why an archive member causing a link error is linked in.  What I need
is a clean and fast method, e.g. a gld option or, better, a direct information
in the error message.

Philippe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: why is an archive member linked in ?
  1997-12-29 19:09 why is an archive member linked in ? Philippe De Muyter
  1997-12-29 19:24 ` DJ Delorie
@ 1997-12-29 20:09 ` Ian Lance Taylor
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 1997-12-29 20:09 UTC (permalink / raw)
  To: phdm; +Cc: gas2

   Date: Tue, 30 Dec 1997 04:09:04 +0100 (MET)
   From: "Philippe De Muyter" <phdm@macqel.be>

   I need to answer the following ld-related question : why is some specific
   archive-member linked in ?  Is there a gld option available 
   or some other more intricated way  to answer that question ?

Use the -M/-Map option, and look at the top of the mapfile.

Ian

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-12-29 20:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-29 19:09 why is an archive member linked in ? Philippe De Muyter
1997-12-29 19:24 ` DJ Delorie
1997-12-29 20:01   ` Philippe De Muyter
1997-12-29 20:09 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).