Decreasing BSS size for STM32F4

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Oct 30 10:07:53 UTC 2014


On 14/10/14 12:47, Мороз Олег wrote:
> arm-rtems4.11-readelf -l shell.exe
>
> Elf file type is EXEC (Executable file)
> Entry point 0x8000189
> There are 4 program headers, starting at offset 52
>
> Program Headers:
>    Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz Flg Align
>    EXIDX          0x027aa0 0x080279e8 0x080279e8 0x00008 0x00008 R   0x4
>    LOAD           0x0000b8 0x08000000 0x08000000 0x27a00 0x27a00 RWE 0x8
>    LOAD           0x027ab8 0x20001188 0x08027a00 0x0061c 0x0061c RW  0x8
>    LOAD           0x0280e0 0x20000000 0x20000000 0x00000 0x30000 RW  0x20
>
>   Section to Segment mapping:
>    Segment Sections...
>     00     .ARM.exidx
>     01     .start .text .init .fini .rodata .ARM.exidx .eh_frame .init_array
> .fini_array .jcr
>     02     .data
>     03     .vector .bss .work
>
>
> On 14.10.2014 14:10, Sebastian Huber wrote:
>> arm-rtems4.11-readelf -l
>

Actually readelf -l was not really the right tool, with objdump -h you get 
something like this (or readelf -S):

objdump -h testsuite/syscalls01/syscalls01.exe

testsuite/syscalls01/syscalls01.exe:     file format elf32-littlearm

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
   0 .start        00000684  00100000  00100000  000000c0  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
   1 .xbarrier     00000000  00100684  00100684  000d5c68  2**0
                   CONTENTS
   2 .text         000c01e4  001006c0  001006c0  00000780  2**6
                   CONTENTS, ALLOC, LOAD, CODE
   3 .init         0000000c  001c08a4  001c08a4  000c0964  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
   4 .fini         0000000c  001c08b0  001c08b0  000c0970  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
   5 .robarrier    00000000  001c08bc  001c08bc  000d5c68  2**0
                   CONTENTS
   6 .rodata       0000cb10  001c08c0  001c08c0  000c0980  2**3
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   7 .ARM.exidx    00000008  001cd3d0  001cd3d0  000cd490  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   8 .eh_frame     00000074  001cd3d8  001cd3d8  000cd498  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   9 .init_array   00000004  001cd44c  001cd44c  000cd50c  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  10 .fini_array   00000004  001cd450  001cd450  000cd510  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  11 .jcr          00000004  001cd454  001cd454  000cd514  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  12 .rtemsroset   00000578  001cd458  001cd458  000cd518  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  13 .rwbarrier    00032630  001cd9d0  001cd9d0  000cda90  2**0
                   ALLOC
  14 .vector       00001700  00200000  00200000  000cda90  2**0
                   ALLOC
  15 .data         00007f2c  00201700  00201700  000cdb00  2**3
                   CONTENTS, ALLOC, LOAD, DATA
  16 .rtemsrwset   0000023c  0020962c  0020962c  000d5a2c  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  17 .bss          0000734e  00209880  00209880  000d5c68  2**7
                   ALLOC
  18 .work         0fdeb432  00210bce  00210bce  000d5c68  2**0
                   ALLOC
  19 .stack        00000000  0fffc000  0fffc000  000d5c68  2**0
                   CONTENTS
  20 .comment      00000072  00000000  00000000  000d5c68  2**0
                   CONTENTS, READONLY
  21 .debug_aranges 00004a50  00000000  00000000  000d5ce0  2**3
                   CONTENTS, READONLY, DEBUGGING
  22 .debug_info   004b9125  00000000  00000000  000da730  2**0
                   CONTENTS, READONLY, DEBUGGING
  23 .debug_abbrev 0004c7d9  00000000  00000000  00593855  2**0
                   CONTENTS, READONLY, DEBUGGING
  24 .debug_line   0008d95a  00000000  00000000  005e002e  2**0
                   CONTENTS, READONLY, DEBUGGING
  25 .debug_frame  00030748  00000000  00000000  0066d988  2**2
                   CONTENTS, READONLY, DEBUGGING
  26 .debug_str    000377cc  00000000  00000000  0069e0d0  2**0
                   CONTENTS, READONLY, DEBUGGING
  27 .debug_loc    000723ef  00000000  00000000  006d589c  2**0
                   CONTENTS, READONLY, DEBUGGING
  28 .ARM.attributes 00000033  00000000  00000000  00747c8b  2**0
                   CONTENTS, READONLY

So the major section is .work which contains the RTEMS workspace and the C 
program heap.

-- 
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 devel mailing list