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: Footprint of an ecos application


On Mon, Sep 08, 2003 at 01:35:34PM +0200, Reinhard JESSICH wrote:
> I have made several configurations with a lightly modified TwoThreads application.
> We use the Motorola MPC8265A (PowerPC)
> 
> After conversion to binary the resulting sizes are:
> 
>  55074 bytes with disabled Network; CYGDBG_USE_ASSERTS and
>  CYGPKG_INFRA_DEBUG are set to 0.
> 
>  217290 bytes with enabled Network; CYGDBG_USE_ASSERTS and
>  CYGPKG_INFRA_DEBUG are set to 0.
> 
> Note that the TwoThreads application does not use any functions of the network stack.
> I thought the network stack needs 100kbytes (only from rumours), but judging from my
> example it seems to be more like 160kB. This is very surprising as I used the
> gc-sections linker command which is supposed to remove all un-referenced symbols.

The reason more is not removed is because the stack uses tables of
function pointers. It has to be able to throw away the whole table
before it can throw away the functions in the table. But the basic
dispatching of frames into the bottom of the stack still uses these
tables. If you where to look at the linker map, i expect you get a
tree rooted in the Ethernet drivers. These are in libextra.a, which is
something the linker is not allowed to remove. I expect that the basic
socket API has been removed, but all layers under that are still
there.

If you know your application only needs TCP you could remove UDP, RAW
sockets etc. This will shrink down the stack size. To remove more you
will need to look at the linker map.

        Andrew



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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