avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] math linking problem even with -lm


From: Andrew McNabb
Subject: Re: [avr-gcc-list] math linking problem even with -lm
Date: Tue, 21 Jun 2005 15:24:22 -0600
User-agent: Mutt/1.4.2.1i

On Tue, Jun 21, 2005 at 10:43:24PM +0200, Joerg Wunsch wrote:

> Order is important when linking.  By the time the linker processes
> your -lm option, it doesn't have anything that needs to be resolved by
> a module found in libm.a, so it proceeds with the next command-line
> argument.  That one will eventually trigger the reference to a symbol
> named "sin", but no further library on the command-line could resolve
> that symbol.

Wow.  That's interesting.  I don't think I ever had that problem with
linking for other platforms, but it sort of makes sense.

I downloaded your Makefile template that Eric referred to, and it works
great.

> Btw., I'd personally avoid using time-consuming functions like
> trigonometrical functions within an interrupt vector.  Heck, I'd avoid
> calling *any* function from within an interrupt vector, as it will
> make the compiler push/pop a lot more registers than needed without
> that.

Yeah.  I was just testing some stuff out.  I'm actually planning on
precomputing a table and then grabbing entries from it in the interrupt
handler.  Is that a reasonable approach?

Thanks a ton for your help.

-- 
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868

Attachment: pgpHxxQUbhjqL.pgp
Description: PGP signature


reply via email to

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