public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Programs Image Size
@ 2000-07-20 16:47 Fabrice Gautier
  2000-07-20 17:28 ` Gary Thomas
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Gautier @ 2000-07-20 16:47 UTC (permalink / raw)
  To: Ecos-List (E-mail)

Hi,

When building the examples in the eCos/examples directory, with a default
ARM PID board configuration, the resulting .exe images are about 1 Meg in
size. However when downloading to the board the downloaded size is only
about 40Ko. Why is there such a difference? What are in the .exe images? And
how can I evaluate the "real" size?

Thank You.

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

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

* RE: [ECOS] Programs Image Size
  2000-07-20 16:47 [ECOS] Programs Image Size Fabrice Gautier
@ 2000-07-20 17:28 ` Gary Thomas
  0 siblings, 0 replies; 2+ messages in thread
From: Gary Thomas @ 2000-07-20 17:28 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: Ecos-List (E-mail)

On 20-Jul-2000 Fabrice Gautier wrote:
> Hi,
> 
> When building the examples in the eCos/examples directory, with a default
> ARM PID board configuration, the resulting .exe images are about 1 Meg in
> size. However when downloading to the board the downloaded size is only
> about 40Ko. Why is there such a difference? What are in the .exe images? And
> how can I evaluate the "real" size?
> 

The executable image will contain information used by GDB and/or Insight
for debugging purposes.  Since this information must represent the program
in it's entirety, you can imagine it might be large.

If you want to see how big a program is, try using "size" or "objdump".
E.g.
[gary@hermes edb7212_test]$ arm-elf-size install/tests/kernel/current/tests/tm_basic 
   text    data     bss     dec     hex filename
  43184    5360 5798192 5846736  5936d0 install/tests/kernel/current/tests/tm_basic

[gary@hermes edb7212_test]$ arm-elf-objdump -h install/tests/kernel/current/tests/tm_basic 

install/tests/kernel/current/tests/tm_basic:     file format elf32-littlearm

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .debug_aranges 000010a0  00000000  00000000  00013da0  2**0
                  CONTENTS, READONLY, DEBUGGING
  1 .debug_pubnames 00002ed7  00000000  00000000  00014e40  2**0
                  CONTENTS, READONLY, DEBUGGING
  2 .debug_info   0006dda7  00000000  00000000  00017d17  2**0
                  CONTENTS, READONLY, DEBUGGING
  3 .debug_abbrev 00005adf  00000000  00000000  00085abe  2**0
                  CONTENTS, READONLY, DEBUGGING
  4 .debug_line   00012f73  00000000  00000000  0008b59d  2**0
                  CONTENTS, READONLY, DEBUGGING
  5 .rom_vectors  00000060  00008000  00008000  00008000  2**5
                  CONTENTS, ALLOC, LOAD, CODE
  6 .text         0000a850  00008060  00008060  00008060  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  7 .fini         00000000  000128b0  000128b0  0009e510  2**0
                  CONTENTS
  8 .rodata       000010e0  000128b0  000128b0  000128b0  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  9 .rodata1      00000000  00013990  00013990  0009e510  2**0
                  CONTENTS
 10 .fixup        00000000  00013990  00013990  0009e510  2**0
                  CONTENTS
 11 .gcc_except_table 00000000  00013990  00013990  0009e510  2**0
                  CONTENTS
 12 .data         00000410  00013990  00013990  00013990  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 13 .bss          00587930  00013da0  00013da0  00013da0  2**4
                  ALLOC
 14 .sram         00000000  60000000  60000000  0009e510  2**0
                  CONTENTS


From this example, you can see that the code size of this program is
only 43k, but the debug information is quite large (750k).

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

end of thread, other threads:[~2000-07-20 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-20 16:47 [ECOS] Programs Image Size Fabrice Gautier
2000-07-20 17:28 ` Gary Thomas

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).