About "Add per-section compilation and linking support" and libdl
Сергей Круглов
sergkruglov at bk.ru
Fri Jan 15 15:15:33 UTC 2016
I succesfully use libdl with mips processors (R300 with small correct resole mips16 relocs).
RTEMS 4.11 and 4.12
1. After patch rtems “Add per-section compilation and linking support" image size reduce 811400 –> 653864.
It’s OK, but now rap file generate incorrectly and not load.
Test program only get and print lists tasks, semaphores, messages, periiods.
Without per-section compilation symbol map:
size align offset
.text: 2000 16 0x00000054 (84)
.const: 368 0 0x00000824 (2084)
.ctor: 0 0 0x00000994 (2452)
.dtor: 0 0 0x00000994 (2452)
.data: 0 16 0x00000994 (2452)
.bss: 0 16 -
strtab: 82 - 0x00000994 (2452)
symtab: 48 - 0x000009e6 (2534)
relocs: 1332 - 0x00000a16 (2582)
Details: 0x00000020 (32)
No details
Strings: 0x00000994 (2452) size: 82
0 (0x000000):
1 (0x000001): rtems
2 (0x000007): _Heap_Get_information
3 (0x00001d): _Heap_Iterate
4 (0x00002b): _Protected_heap_Get_information
5 (0x00004b): rtems
6 (0x000051):
Symbols: 0x000009e6 (2534) size: 48
data section value name
0: 0x0012 .text 0x00000000 rtems
1: 0x0012 .text 0x00000000 _Heap_Get_information
2: 0x0012 .text 0x00000000 _Heap_Iterate
3: 0x0012 .text 0x00000000 _Protected_heap_Get_information
With per-section compilation symbol map:
size align offset
.text: 2404 16 0x00000054 (84)
.const: 368 0 0x000009b8 (2488)
.ctor: 0 0 0x00000b28 (2856)
.dtor: 0 0 0x00000b28 (2856)
.data: 4 16 0x00000b28 (2856)
.bss: 0 16 -
strtab: 156 - 0x00000b2c (2860)
symtab: 96 - 0x00000bc8 (3016)
relocs: 1488 - 0x00000c28 (3112)
Details: 0x00000020 (32)
No details
Strings: 0x00000b2c (2860) size: 156
0 (0x000000):
1 (0x000001): rtems
2 (0x000007): rtems_object_get_name
3 (0x00001d): _Heap_Get_information
4 (0x000033): _Heap_Iterate
5 (0x000041): _Objects_Get_name_as_string
6 (0x00005d): _Protected_heap_Get_information
7 (0x00007d): putchar
8 (0x000085): BSP_output_char
9 (0x000095): rtems
10 (0x00009b):
Symbols: 0x00000bc8 (3016) size: 96
data section value name
0: 0x0012 .text 0x00000000 rtems
1: 0x0012 .text 0x00000000 rtems_object_get_name
2: 0x0012 .text 0x00000000 _Heap_Get_information
3: 0x0012 .text 0x00000000 _Heap_Iterate
4: 0x0012 .text 0x00000000 _Objects_Get_name_as_string
5: 0x0012 .text 0x00000000 _Protected_heap_Get_information
6: 0x0012 .text 0x00000000 putchar
7: 0x0011 .data 0x00000000 BSP_output_char
Dynamic loader say: Duplicate symbol BSP_output_char
and stop loading.
2. Also after allocate .bss section it not zeroed and static uninitialized symbols have undefined value.
In standart linker bss section zeroed in startup procedure.
May be need memset after allocate bss section?
Sorry for my english
With best reagrds, Serg Kruglov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160115/51e7d060/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wlEmoticon-smile[1].png
Type: image/png
Size: 1046 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20160115/51e7d060/attachment.png>
More information about the users
mailing list