This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: why is an archive member linked in ?



> 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.