Re: to reduce footprint

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi George,

To be honest, I don't know the strip tool that well either. I thought it
only removed the debug information out of your final exe program. I am
currently studiing on a open source project, for win32, that uses the gcc
compiler and the typical "./configure" "make" "make install" method to
compile things. I found out that my exe file was approx 10MB in size, while
the original exe that came with the project was only 2MB. After I striped
the exe, it's size was below 2MB, and I found no lack of functionality
compared to the 10MB version. the "strip --help" should explain it's
functionality.

Functionality and footprint are a balanced pair, as you mention. In the case
of strip, the drawback in functionality is the fact that your exe can't be
debugged anymore.
If you further want to reduce your footprint, you might put all the
configuration stuff of your program in a separate application, as it should
not be used that often. That way, your main program will become smaller.
The drawback is that it will take a longer time to enter the configuration,
since the other program has to be loaded.

The ram memory of mobile devices keeps increasing every year. Unless you
wan't to build a device yourself, for a specific purpose, and you want to
make it as cheap as possible, I don't see the footprint as a serious
bottleneck. If you want your program to run on as many devices as possible,
even the older ones with less memory, it could be a issue to take into
account. At that moment you will also face the problem of different windows
mobile versions running on them....

regards,

Luc

"George" <George@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:862DD4AF-0D20-4D9E-8770-97D3CD41416D@xxxxxxxxxxxxxxxx
Thanks Luc! I am developing an embedded application for both Windows
Mobile
and Linux platform, and I want to find some general ways (standard ways)
to
reduce footprint.

I have heard of using strip will reduce the footprint. But I have a
concern
that whether strip the binary will reduce some functions of the binary? I
have the concern is because I think function and footprint are balanced
pair,
if I reduce the footprint -- I may lose some functions.

Any comments or clarifications?

BTW: I think strip could only be used for debug version, and release
version
can not use it. Is my understanding correct?


regards,
George


"Luc Cool" wrote:

Hi,

not sure what you are building and how you are doing it with gcc. If you
use
pretty much the default compiler options, than the "strip.exe" program
might
remove some debug information in your program. This can reduce it's size
approx 6 times. There might be compiler and linker options that exclude
the
debug info during make phase, but I don't know them. You might ask this
question in a linux newsgroup, as they are more familiar with the gcc
tools.

regards,

Luc


"George" <George@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3FCADCC0-FDD9-467C-8E88-E79244F76618@xxxxxxxxxxxxxxxx
Hello everyone,


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?


thanks in advance,
George





.



Relevant Pages

  • Re: to reduce footprint
    ... Thanks for your great answer Luc! ... only removed the debug information out of your final exe program. ... the exe, it's size was below 2MB, and I found no lack of functionality ... Functionality and footprint are a balanced pair, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Why VB 3.0?
    ... the contents of .zip files and strip them off if they contain ... any .exe or other executable files. ... ban those as well!!! ...
    (comp.lang.basic.visual.misc)
  • Re: Why VB 3.0?
    ... the contents of .zip files and strip them off if they contain ... any .exe or other executable files. ... Even jpg and bmp files can damage an unprotected machine, so I suppose some virus checkers ban those as well!!! ...
    (comp.lang.basic.visual.misc)
  • Re: Delphi in Danger
    ... did run strip on the exe. ... Only if you are salesman. ... E.g. if appealing to human nature leads to a unworkable ...
    (borland.public.delphi.non-technical)
  • Re: ODBReference does not understand #isImme
    ... Created a fresh image, loaded the packages, strip to exe seemed to work ... Now to work out why the app doesn't seem to run, ...
    (comp.lang.smalltalk.dolphin)