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]
Other format: [Raw text]

Re: File Size Problem??


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
grante@visi.com


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