public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Size of downloaded files?
@ 2000-09-18  7:13 Andreas.Karlsson
  2000-09-18  7:33 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas.Karlsson @ 2000-09-18  7:13 UTC (permalink / raw)
  To: ecos-discuss

Hi,

Is there any way I can see how much each .c file contributes to the size
that will be downloaded to the target?

/Andreas

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

* RE: [ECOS] Size of downloaded files?
  2000-09-18  7:13 [ECOS] Size of downloaded files? Andreas.Karlsson
@ 2000-09-18  7:33 ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2000-09-18  7:33 UTC (permalink / raw)
  To: Andreas.Karlsson; +Cc: ecos-discuss

On 18-Sep-2000 Andreas.Karlsson@combitechsystems.com wrote:
> Hi,
> 
> Is there any way I can see how much each .c file contributes to the size
> that will be downloaded to the target?

Yes and no.  Something simple like:
  find . -name "*.o" -exec arm-elf-size \{} \;
will show you the rough sizes of the object files.

However, due to selective linking this will be misleading since much
of what you might see can be left out if you're not actually using it.

You can also generate a linker map to see what sections and their sizes
are part of the final image.

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

* RE: [ECOS] Size of downloaded files?
  2000-09-18  8:15 Andreas.Karlsson
@ 2000-09-18  8:18 ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2000-09-18  8:18 UTC (permalink / raw)
  To: Andreas.Karlsson; +Cc: ecos-discuss

On 18-Sep-2000 Andreas.Karlsson@combitechsystems.com wrote:
> How do I generate a linker map?
> 
> I tried with this and with Map at several other places.
> 
> /Andreas
> 
> arm-elf-gcc -mcpu=arm7di                         -nostartfiles
> -L//d/ecos-work/aeb/config2_install/lib -Map my_mapfile, -Wl,--gc-sections
> -o testprog testprog.o receiver.o  -Ttarget.ld -nostdlib
> 
> arm-elf-gcc: my_mapfile,: No such file or directory
> 
> arm-elf-gcc: unrecognized option `-Map'
> 
> make: *** [testprog] Error 1
> 
> bash-2.04$
> 

You need to pass the options as -Wl,xxx  Thus,
  -Wl,-Map -Wl,my_mapfile

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

* RE: [ECOS] Size of downloaded files?
@ 2000-09-18  8:15 Andreas.Karlsson
  2000-09-18  8:18 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas.Karlsson @ 2000-09-18  8:15 UTC (permalink / raw)
  To: gthomas; +Cc: ecos-discuss

How do I generate a linker map?

I tried with this and with Map at several other places.

/Andreas

arm-elf-gcc -mcpu=arm7di                         -nostartfiles
-L//d/ecos-work/aeb/config2_install/lib -Map my_mapfile, -Wl,--gc-sections
-o testprog testprog.o receiver.o  -Ttarget.ld -nostdlib

arm-elf-gcc: my_mapfile,: No such file or directory

arm-elf-gcc: unrecognized option `-Map'

make: *** [testprog] Error 1

bash-2.04$



> On 18-Sep-2000 Andreas.Karlsson@combitechsystems.com wrote:

> > Hi,

> > 

> > Is there any way I can see how much each .c file 

> contributes to the size

> > that will be downloaded to the target?

> 

> Yes and no.  Something simple like:

>   find . -name "*.o" -exec arm-elf-size \{} \;

> will show you the rough sizes of the object files.

> 

> However, due to selective linking this will be misleading since much

> of what you might see can be left out if you're not actually using it.

> 

> You can also generate a linker map to see what sections and 

> their sizes

> are part of the final image.

> 

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

end of thread, other threads:[~2000-09-18  8:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-18  7:13 [ECOS] Size of downloaded files? Andreas.Karlsson
2000-09-18  7:33 ` Gary Thomas
2000-09-18  8:15 Andreas.Karlsson
2000-09-18  8:18 ` 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).