[Top][All Lists]

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

Re: [avr-gcc-list] Linking and unused functions.

From: Theodore A. Roth
Subject: Re: [avr-gcc-list] Linking and unused functions.
Date: Wed, 3 Mar 2004 15:56:57 -0800 (PST)

On Wed, 3 Mar 2004, Alan Kilian wrote:

>   I have been trying to use the avrlib from Pascal Stang
>   <http://hubbard.engr.scu.edu/embedded/avr/avrlib/>
>   on an AT90S2313 and at first, I thought the code was huge,
>   but on further analysis, it appears that every function in
>   a .o file gets linked even if it is never used.
>   I edited lcd.c and timer.c to remove unused functions and the
>   size of the hex file dropped dramatically. It's now about 10%
>   of what it was before.
>   I am not used to this behavior. I'm used to having only the
>   functions actually called getting linked into the hex file.
>   Is there something I'm doing incorrectly?
>                           -Alan


This is exactly what avr-libc does.

This should probably be added to the FAQ.

Ted Roth

avr-gcc-list mailing list

reply via email to

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