public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Footprint of an ecos application
@ 2003-09-08 11:35 Reinhard JESSICH
  2003-09-08 15:21 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Reinhard JESSICH @ 2003-09-08 11:35 UTC (permalink / raw)
  To: ecos-discuss

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.

Did anybody observe similar sizes?

Any hints are appreciated

BR
   Reinhard


-- 
 Ing. Reinhard Jessich                Phone: +43/1/81150/2395
 Software Design                      Fax: +43/1/81150/3169
 Frequentis Nachrichtentechnik GmbH   A-1120 Wien, Spittelbreitengasse 34
 http://www.frequentis.com            eMail: reinhard.jessich@frequentis.com


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] Footprint of an ecos application
  2003-09-08 11:35 [ECOS] Footprint of an ecos application Reinhard JESSICH
@ 2003-09-08 15:21 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2003-09-08 15:21 UTC (permalink / raw)
  To: Reinhard JESSICH; +Cc: ecos-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-08 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-08 11:35 [ECOS] Footprint of an ecos application Reinhard JESSICH
2003-09-08 15:21 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).