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

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

[avr-gcc-list] AVR-GCC dead function elimination??


From: David Snowdon
Subject: [avr-gcc-list] AVR-GCC dead function elimination??
Date: Sun, 8 Jun 2003 15:31:33 +1000

G'Day,

I've been working on a library for doing a bunch of CAN communications on a number of platforms for a number of devices. I essentially want one library that I can include in a sensor in a network which makes it easy to write the small amount of software that customises that node.

I had thought that GCC would simply remove functions which aren't used. Since its a general-purpose library, not every node will use every function. This apparently isn't the case, but what are the limitations in providing such functionality? Its a massive problem since I only use a small proportion of the functions in each module in the library.

Eric Waddington suggested (on an AVRFREAKS forum) that I should compile each function into a different .o file, build a library using these files, and then the linker would selectively include the .o files. While it sounds like this would work, it seems like a bit of a hack!

Is this a feature that can be implemented? What are the limitations?

Cheers,

Dave.



reply via email to

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