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

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

[avr-gcc-list] Use of -ffunction-section, -fdata-section, and --gc-sect


From: Ebert, Rolf
Subject: [avr-gcc-list] Use of -ffunction-section, -fdata-section, and --gc-sections to g et rid of unused code
Date: Wed, 25 Jun 2003 15:09:47 +0200

What are the implications of using -ffunction-section and -fdata-section for
the compiler and --gc-sections for the linker?

As far as I understand the object file format is ELF, so these options
should probably work for AVR.  One cannot use separate sections for dynamic
libraries, but we don't do that anyway on an embedded system.

I expect that --gc-sections can automatically remove all unused functions in
the final binary even though they are not in separate *.o files.  Is that
right?

I'll try it myself as soon as I find the time.  I just thought that anybody
else has already used these options.

        Rolf


reply via email to

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