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


Thanks Ian! I have read related documents.

1. -s is used for strip symbols, is my finding correct? If yes, I have a concern whether strip (remove) symbols will reduce some functions of my binary? Since I think footprint and size are a balanced pair. If I make footprint smaller, I will lose some functions of the binary?

2. -n is used for remove page alignment to reduce un-necessary page level alignment (for example, un-necessary padding or something). Is my understanding correct?


regards,
George


----- Original Message ----
From: Ian Lance Taylor <iant@google.com>
To: Lin George <george4academic@yahoo.com>
Cc: binutils@sourceware.org
Sent: Tuesday, December 19, 2006 11:58:45 AM
Subject: 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

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com


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