This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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: File Size Problem??


HuangQiang wrote:
>  How can I get the actual size of the app for the arm? I
> convert it to binary by using arm-elf-objcopy -O binary a.out b, I got b
> 200KB , how come? Is it possible for just for a plain main function? Is
> there any way to get the size of each section for the binary file?

Just to make a point no-one else has emphasised, a lot of that size comes
from components you probably don't need. Perhaps even the net stack. If you
don't need that, don't include it - it's quite big. Also remember that eCos
is a highly configurable system and the default configuration is far from
the smallest. You can remove entire packages to reduce the size. Depending
on the target, you can reduce eCos to less than 1 Kb, but then you don't
get a lot of services with that :).

You can see in gruesome detail what is taking up space by generating a
linker map. Do this by adding -Wl,--Map,foo to your application link line,
which will generate the map file named foo.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


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