Re: removing unused functions during final link

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

 



On Wed, Aug 27, 2014 at 2:02 PM, Melvin Blades <melvin.blades@xxxxxxxxx> wrote:
>
> What command line options can I use to get the linker to strip unused
> functions from the final executable?

Compile with -ffunction-sections -fdata-sections.

Link with -Wl,--gc-sections.

Ian




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux