unused functions

Hans-Peter Nilsson hp@bitrange.com
Thu Oct 31 15:36:00 GMT 2002


On Thu, 31 Oct 2002, Aleksandar Simeonov wrote:

> Hi everybody,
> I'm looking the way to delete all unused functions from output elf file. Is
> there any suggestions about that? I need that for mips-lexra.

Use the gcc option -ffunction-sections.  Then when linking, use
the ld option --gc-sections.  Use -Wl,--gc-sections when linking
through gcc; recommended.  These options are documented; see the
gcc and binutils documentation for further info.

brgds, H-P



More information about the Binutils mailing list