|
From: Paul M. <pa...@sa...> - 2005-11-15 11:21:27
|
Josef Weidendorfer writes: > 1) There is a "strange function" with a single instruction "blrl". > It is called quite often at the start of any code in /lib/ld.so, > address 0x04027528; ld.so is mapped starting from 0x04000000. In the current PPC32 ELF ABI, there is a blrl instruction in the word before the start of the GOT (global offset table). Shared libraries use a bl GOT-4 to get the address of the GOT into LR in position-independent code. I wouldn't consider the bl and blrl to denote a function call. > According to callgrind debug output, address 0x04027528 is not attributed > to any segment by valgrind (using VG_(find_seginfo)()). > Looking at proc/XXX/maps, I get: > > 04000000-04017000 r-xp 00000000 03:03 557124 /lib/ld-2.3.5.so > 04017000-0401c000 rw-p 04017000 00:00 0 > 04026000-04027000 r--p 00016000 03:03 557124 /lib/ld-2.3.5.so > 04027000-04028000 rwxp 00017000 03:03 557124 /lib/ld-2.3.5.so > > Does anybody have an idea what can cause this? What particular aspect of that are you asking about? It looks OK to me; the r--p bit is the relro section (relocation read-only), which is read/write while relocations are being done and then gets changed to read-only. The rwxp is the rest of the data section. Paul. |