This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: eCos kernel image size
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Satish Kumar <satish at bvt dot sc dot sanyo dot co dot jp>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 27 Aug 2003 21:35:34 -0600
- Subject: Re: [ECOS] eCos kernel image size
- Organization: MLB Associates
- References: <20030828114201.C470.SATISH@bvt.sc.sanyo.co.jp>
On Wed, 2003-08-27 at 20:48, Satish Kumar wrote:
> Hi,
> i have this basic doubt i guess..i m interested in knowing
> the eCos basic kernel image size..i only see a ecos library build
> and when i try compiling the hello.c program with the above ecos
> library using arm-elf-gcc..my hello.bin is something around 780 kb,
> which is just too large..now this library contains default package.
>
> i m just interested in knowing only the eCos kernel image size
> with out the C library..!! how to know this kernel size..?
You're not looking at the size of the program, just the size of
the ELF image! The ELF image contains *LOTS* of debug information
which makes it appear quite large. In reality, the kernel itself
is quite small. What you need to do is use the "size" utility to
determine the actual memory requirements.
For example, a "hello" application built with the default template:
[gthomas@hermes t]$ ls -l hello
-rwxr-xr-x 1 gthomas wheel 1643945 Aug 27 21:33 hello
[gthomas@hermes t]$ powerpc-eabi-size hello
text data bss dec hex filename
52940 0 16300 69240 10e78 hello
>From this, you can see that the ELF file is 1.6MB, but the actual
executable image is only 52KB of TEXT + 16KB of DATA.
If you include things like the TCP/IP stack, then things are a bit
larger, but still quite reasonable:
[gthomas@hermes tests]$ ls -l vnc-test
-rwxr-xr-x 1 gthomas wheel 5678228 Aug 27 12:19 vnc-test
[gthomas@hermes tests]$ powerpc-eabi-size vnc-test
text data bss dec hex filename
345912 0 993892 1339804 14719c vnc-test
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss