This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: unused functions
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Aleksandar Simeonov <Aleksandar dot Simeonov at micronasnit dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 31 Oct 2002 18:36:04 -0500 (EST)
- Subject: Re: unused functions
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