[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] FAQ (was: strange behaviour with ceil())

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] FAQ (was: strange behaviour with ceil())
Date: Tue, 30 Jul 2002 11:14:25 +0200 (MET DST)

Theodore Roth <address@hidden> wrote:

> I need to study up on what the link editor does and how it searches
> archives before I can give an answer that isn't just hand waving.

The link editor basically uses all the .a and -lfoo files to resolve
references that are still undefined at the point when the library is
searched.  The search is a simple linear one, so any additional
undefined reference will remain undefined afterwards.  Thus, it could
be required to specifiy some libraries twice.  If you run the compiler
with -v, you'll see that it always appends "-lgcc -lc -lgcc".  (For
dynamic linkage, it could be permissible to just leave the undefined
references undefined, and only emit a runtime error if they are really
touched.  But that doesn't apply to the AVR target anyway.)

So as Sander correctly mentioned, by explicitly requesting a different
-lm on the command line, it'll get in before the trailing -lgcc -lc
-lgcc, thus all unresolved references should be satisfied from the
explicitly linked -lm.

J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/
avr-gcc-list at http://avr1.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]