|
From: Josef W. <Jos...@gm...> - 2005-11-15 09:39:56
|
Hi,
I have a better working callgrind for PPC now ...
Two issues:
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.
According to objdump, 27528 is still part of ld.so:
objdump -d /lib/ld-2.3.5.so | less
Disassembly of section .got:
00027000 <.got>:
...
27528: 4e 80 00 21 blrl
2752c: 00 02 6f 50 .long 0x26f50
...
So this is code in the GOT table. Thus, the code seems to put the
GOT of a DSO into lr, which then often is put into an general
purpose register (e.g. with mflr r30).
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?
I use the segment info to decide if a boring jump should be changed
to a call (ie. when crossing segment boundaries; this is for x86/x86_64
from PLT section to another DSO).
Josef
|