large bss size for sample applications

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Sep 25 05:46:42 UTC 2015



On 24/09/15 15:53, Jeff Webb wrote:
> Running readelf on the stripped executable yields:

You don't have to strip the ELF file to reduce the size on the target, 
since the debug sections are not loaded.

>
> Section Headers:
>   [Nr] Name              Type            Addr     Off    Size   ES Flg 
> Lk Inf Al
>   [ 0]                   NULL            00000000 000000 000000 
> 00      0   0  0
>   [ 1] .start            PROGBITS        00104000 0000c0 0003e0 00  
> AX  0   0  4
>   [ 2] .text             PROGBITS        00104400 0004c0 0102b8 00 
> WAX  0   0 64
>   [ 3] .init             PROGBITS        001146b8 010778 00000c 00  
> AX  0   0  4
>   [ 4] .fini             PROGBITS        001146c4 010784 00000c 00  
> AX  0   0  4
>   [ 5] .rodata           PROGBITS        001146d0 010790 001460 00   
> A  0   0  4
>   [ 6] .ARM.exidx        ARM_EXIDX       00115b30 011bf0 000008 00  
> AL  2   0  4
>   [ 7] .eh_frame         PROGBITS        00115b38 011bf8 000074 00   
> A  0   0  4
>   [ 8] .init_array       INIT_ARRAY      00115bac 011c6c 000004 00  
> WA  0   0  4
>   [ 9] .fini_array       FINI_ARRAY      00115bb0 011c70 000004 00  
> WA  0   0  4
>   [10] .jcr              PROGBITS        00115bb4 011c74 000004 00  
> WA  0   0  4
>   [11] .vector           NOBITS          00115bb8 011c78 001400 00  
> WA  0   0  1
>   [12] .data             PROGBITS        00116fb8 011c78 0006e8 00  
> WA  0   0  8
>   [13] .bss              NOBITS          001176a0 012360 002174 00  
> WA  0   0 32
>   [14] .work             NOBITS          00119814 012360 0267ec 00  
> WA  0   0  1
>   [15] .comment          PROGBITS        00000000 012360 000075 01  
> MS  0   0  1
>   [16] .ARM.attributes   ARM_ATTRIBUTES  00000000 0123d5 000033 
> 00      0   0  1
>   [17] .shstrtab         STRTAB          00000000 012408 000090 
> 00      0   0  1
>
> So, it looks like the program + data + bss is around 86K, with 154K 
> left for the stack and work space, right? 

Yes, exactly.

The approach in these tickets would help to reduce the size a bit more:

https://devel.rtems.org/ticket/2407
https://devel.rtems.org/ticket/2408

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the users mailing list