[ECOS] File Size Problem??

Grant Edwards grante@visi.com
Tue Dec 11 13:12:00 GMT 2001

On Tue, Dec 11, 2001 at 08:52:34PM -0000, HuangQiang wrote:

> Will the size of binary file = sum of each section of the
> a.out (image file).

It will be the sum of the sizes of _some_ of the sections in
the a.out file plus the size of any holes between sections.

The size of the binary file will be one larger than the
difference between the lowest addressed byte and the highest
addressed byte in the set of sections whose "L" flags are set.

The easiest way to find out the size of a binary file is to
generate one and do "ls -l".  :)

> Or any relation between binary file size and the sections in the a.out
> (image file)?

Yes, there's a relationship, but it's non-obvious.

> Why the debug appeared in the command output (arm-elf-objdump -h) that I
> havn't include '-g' for creating debug information? and should the debug
> section be count into if calculating the size of the file?

Debug info does not contribute the the size of a binary file.

Grant Edwards

More information about the Ecos-discuss mailing list