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

Jon Smirl jonsmirl at gmail.com
Thu Mar 26 16:10:06 CET 2009


On Thu, Mar 26, 2009 at 11:06 AM, Jon Smirl <jonsmirl at gmail.com> wrote:
> On Thu, Mar 26, 2009 at 10:43 AM, Rafal Jaworowski <raj at semihalf.com> wrote:
>>
>> On 2009-03-26, at 15:21, Jon Smirl wrote:
>>
>>> Libraries appear to be the problem. A program that just returns is 100
>>> bytes, add a puts("hello world") and it is 65KB.
>>>
>>> I had expected the u-boot app examples to be smart and use the copy of
>>> those libraries in the u-boot image. For example the demo program in
>>> api_examples uses printf (65K library) instead of building an api
>>> calling into u-boot for printf.
>>
>> While I can understand your position, let me explain that the idea behind
>> the API was to provide calls to really elementary operations and printf()
>> wasn't considered as such (we only have print, get and test a single
>> character as far as console ops go); things like pre-formatting should be
>> done in the application...
>>
>> The demo application is just a demo, it links in the same printf-formatting
>> code that U-Boot library uses, but specific standalone applications are
>> supposed to implement their own formatting routines.
>
> I'm not sure that the size of the app is caused by libraries.
>
> jonsmirl at terra:/home/apps/u-boot/api_examples$ ls -l demo.bin
> -rwxr-xr-x 1 jonsmirl jonsmirl 79060 2009-03-26 10:58 demo.bin
>
> now gzip the bin....
> -rwxr-xr-x 1 jonsmirl jonsmirl  7677 2009-03-26 10:58 demo.bin.gz
>
> Here's the map file; I'm trying to remember how to read it.
> There's probably 64K of a data segment being initialized with zeros.

What is this doing? Can I turn it off?

.gcc_except_table
 *(.gcc_except_table .gcc_except_table.*)
                0x0000000000043290                . = (ALIGN (0x10000)
- ((0x10000 - .) & 0xffff))
                0x0000000000053290                . = (0x10000
DATA_SEGMENT_ALIGN 0x1000)


-- 
Jon Smirl
jonsmirl at gmail.com


More information about the U-Boot mailing list