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]

Re: Size of eCos binaries


On Fri, Jan 12, 2001 at 08:55:23PM -0500, Lewin A.R.W. Edwards wrote:
> 
> >After I built the eCos libraries for the ARM chip using the Windows
> >Configuration tool, I tried compiling the example programs (hello, serial,
> >etc.) with arm-elf-gcc and the accompanying Makefile. The resulting binaries
> >were about 1 MB large. Is this typical, or am doing something wrong?
> 
> This is normal and typical. Most of that information is debugging 
> information and ELF stuff. When you upload the binary to the target board 
> you'll see that the code size is under 128K.

If you want to see the actual sizes of things you can either use the "size"
program or the objdump program:

$ size elfFileName
$ objdump --sectionHeaders elfFileName

depending on how the tools were build, you may have to put a prefix on the
program names:

$ arm-elf-size elfFileName
$ arm-elf-objdump --sectionHeaders elfFileName

Objdump and objcopy are extremely useful programs.  They can do lots of
different handy things. Read the man pages for both of them.  Honestly, it's
worthwhile.

-- 
Grant Edwards
grante@visi.com

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