This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: to reduce footprint


Lin George <george4academic@yahoo.com> writes:

> I am wondering how to reduce the footprint of a binary build (C/C++) program generated by gcc.
> 
> 1. Any ideas of reduce the footprint of a debug version build?
> 2. Any ideas of reduce the footprint of a release version build?
> 
> I think some linker or compiler options may help, what are they? Any other ideas to reduce footprint?

The obvious place to start is the compiler option -Os, which tells gcc
to optimize for size.

You didn't mention which target you were interested in.  For some
embedded targets, the linker options -n or -N may help.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]