[U-Boot] Size of external u-boot commands

Jon Smirl jonsmirl at gmail.com
Thu Mar 26 22:35:31 CET 2009


On Thu, Mar 26, 2009 at 5:15 PM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Jon Smirl,
>
> In message <9e4733910903261350v21bf16c5l5729927048e0df3b at mail.gmail.com> you wrote:
>>
>> > I'm not sure how you calculate sizes, or how you link your
>> > applications. Note that classical standalone application do not link
>> > against any libraries, so they are really small:
>>
>> The *.bin files are ending up at 60-75K.  Adding this to the linker
>
> Yes, but that's mostly empty space, due to the alignment requirments
> in the linker script.
>
>> script fixes it.
>>   .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table))
>> *(.gcc_except_table.*) }
>>
>> Approximately 60KB of zeros are getting inserted into the *.bin files.
>
> But this is just a "gap", it e. it is not used space; if you have
> bigger program code, or if you change your alignment requirements, you
> will see different (much smaller) values.

I'm on powerpc.
The *.bin format is not smart enough to encode gaps. It just puts in
60KB of zeros.

My ELF files are 73KB.
-rwxr-xr-x 1 jonsmirl jonsmirl 73290 2009-03-26 16:49 hello_world

Tell me the right way to make these example programs small and I'll
submit a patch.

-- 
Jon Smirl
jonsmirl at gmail.com


More information about the U-Boot mailing list