RTL arm load failed
Peng Fan
van.freenix at gmail.com
Sun Nov 2 09:28:15 UTC 2014
Hi,
qemu-system-arm -no-reboot -net none -nographic -M realview-pbx-a9 -m 256M
-kernel `find . -name dl01.exe` -s -S
*** BEGIN OF TEST libdl (RTL) Loader 1 ***
load: /dl-o1.o
rtl: unsupported section: 15: type=1879048195 flags=00
handle: 0x212b10 has unresolved externals
dl-o1.o can not be correctly loaded, because of unresolved symbols.
I do some debug using remote gdb and found it is the reloc entry references
local symbols named "LCx" saying "LC0", "LC1", "LC2".
Freenix at linux-jyl1:~/per/new/build-arm> arm-rtems4.11-readelf -s `find .
-name dl-o1.o`
Symbol table '.symtab' contains 22 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 FILE LOCAL DEFAULT ABS dl-o1.c
2: 00000000 0 SECTION LOCAL DEFAULT 1
3: 00000000 0 SECTION LOCAL DEFAULT 3
4: 00000000 0 SECTION LOCAL DEFAULT 4
5: 00000000 0 SECTION LOCAL DEFAULT 5
6: 00000000 0 NOTYPE LOCAL DEFAULT 5 $d
* 7: 00000000 0 NOTYPE LOCAL DEFAULT 5 .LC0*
* 8: 00000020 0 NOTYPE LOCAL DEFAULT 5 .LC1*
* 9: 00000068 0 NOTYPE LOCAL DEFAULT 5 .LC2*
10: 00000000 0 NOTYPE LOCAL DEFAULT 1 $t
11: 00000000 0 SECTION LOCAL DEFAULT 6
12: 00000000 0 SECTION LOCAL DEFAULT 8
13: 00000000 0 SECTION LOCAL DEFAULT 9
14: 00000000 0 SECTION LOCAL DEFAULT 11
15: 00000000 0 SECTION LOCAL DEFAULT 13
16: 00000010 0 NOTYPE LOCAL DEFAULT 16 $d
17: 00000000 0 SECTION LOCAL DEFAULT 16
18: 00000000 0 SECTION LOCAL DEFAULT 14
19: 00000000 0 SECTION LOCAL DEFAULT 15
20: 00000001 88 FUNC GLOBAL DEFAULT 1 rtems_main
21: 00000000 0 NOTYPE GLOBAL DEFAULT UND printf
The LCx symbols's type is NOTYPE and not included in the rtl symbol
table(local symbol may should not be included). In rtl-elf.c, line 387 see
following, the LCx symbols are not included, so fails. I prefer that if
unresolved symbols detected in rtl, detailed info should be print out, but
i found no debug msg about this.
384 /*
385 * Only keep the functions and global or weak symbols.
386 */
387 if ((ELF_ST_TYPE (symbol.st_info) == STT_OBJECT) ||
388 (ELF_ST_TYPE (symbol.st_info) == STT_FUNC))
I think this cause arm load failed. FYI, rap file are not included in the
dl test?
Regards,
Peng.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20141102/c779d310/attachment.html>
More information about the devel
mailing list