I have some missing symbols when I'm loading an executable with shared libraries, but I can't really figure out where they should come from. I have two major problems now, exception handling and global constructors.
When trying to relocate the shared objects I've loaded, my dynamic linker can't find these symbols:
Code: Select all
_ITM_deregisterTMCloneTable
_ITM_registerTMCloneTable
__deregister_frame_info
__register_frame_info
So for example for __register_frame_info I looked at the ELF headers and the shared library has a relocation entry in .rel.dyn:
Code: Select all
0000639a 0000ee01 R_386_32 00000000 __deregister_frame_inf
000063ab 0000ee02 R_386_PC32 00000000 __deregister_frame_inf
000063d1 00024301 R_386_32 00000000 __register_frame_info
000063ea 00024302 R_386_PC32 00000000 __register_frame_info
000385f8 00000906 R_386_GLOB_DAT 00038d80 _stdin_buf
000385fc 00001f06 R_386_GLOB_DAT 00038a80 stdout
00038600 00004e23 R_386_TLS_DTPMOD3 00000000 errno
Code: Select all
576: 0002adea 53 FUNC GLOBAL DEFAULT 8 mkdir
577: 0001f2a3 132 FUNC GLOBAL DEFAULT 8 logbf
578: 0000cdd9 185 FUNC GLOBAL DEFAULT 8 posix_memalign
579: 00000000 0 NOTYPE WEAK DEFAULT UND __register_frame_info
580: 00026bf1 47 FUNC GLOBAL DEFAULT 8 __stdio_impl_write
581: 0002751e 49 FUNC GLOBAL DEFAULT 8 klog
Code: Select all
1869: 0001f2a3 132 FUNC GLOBAL DEFAULT 8 logbf
1870: 0000cdd9 185 FUNC GLOBAL DEFAULT 8 posix_memalign
1871: 00000000 0 NOTYPE WEAK DEFAULT UND __register_frame_info
1872: 00026bf1 47 FUNC GLOBAL DEFAULT 8 __stdio_impl_write
1873: 0002751e 49 FUNC GLOBAL DEFAULT 8 klog
Code: Select all
281: 0805f254 0 NOTYPE LOCAL DEFAULT 14 __preinit_array_end
282: 0805f340 0 OBJECT LOCAL DEFAULT 20 _GLOBAL_OFFSET_TABLE_
283: 0805f254 0 NOTYPE LOCAL DEFAULT 15 __init_array_start
284: 0805f254 0 NOTYPE LOCAL DEFAULT 14 __preinit_array_start
285: 080582e0 74 FUNC LOCAL DEFAULT 9 __register_frame_info
286: 080570e6 0 FUNC GLOBAL HIDDEN 9 __x86.get_pc_thunk.cx
287: 08048e20 41 FUNC GLOBAL DEFAULT 9 __cxa_free_exception
288: 0804a0a0 3 FUNC GLOBAL DEFAULT 9 _ZNKSt9type_info15__is_fu
289: 08058c54 16 OBJECT WEAK DEFAULT 11 _ZTIPKDs
Thanks in advance!
Greets
EDIT: Okay, I checked the places where _ITM_registerTMCloneTable/_ITM_deregisterTMCloneTable should be relocated into, and it looks to me that this is only relevant if you link with libitm (by using -fgnu-tm), as they are weak references?