|
From: Josef W. <Jos...@gm...> - 2005-11-15 17:33:47
|
On Tuesday 15 November 2005 17:49, Tom Hughes wrote:
> > > call_init(0x2020202E, 0x2020202E, ...) [ld-2.3.5.so / 0xB5D0]
> > .> 0x04027528(0x2020202E, 0x2020202E, ...) [??? / 0x4027528]
> > .> 0x00004500(0x2020202E, 0x2020202E, ...) [libpthread-2.3.5.so / 0x4500]
> > . > 0x00004530(0x2020202E, 0x2020202E, ...) [libpthread-2.3.5.so / 0x4530]
> > . > 0x00021160 [GOT](0x2020202E, 0x2020202E, ...) [libpthread-2.3.5.so / 0x21160]
> >
> > And at 0x00021160 in libpthread-2.3.5.so, I have the blrl again.
>
> Where does that [GOT] marker come from? What is the logic that
> triggers it?
It is from src/fn.c to assign names to addresses where no debug
info is found (bb is a structure for the basic block)
...
if (0 == VG_(strcmp)(fnname, "???")) {
int p;
/* Use address as found in library */
if (sizeof(Addr) == 4)
p = VG_(sprintf)(fnname, "%08p", bb->offset);
else
// 64bit address
p = VG_(sprintf)(fnname, "%016p", bb->offset);
VG_(sprintf)(fnname+p, "%s",
(bb->sect_kind == Vg_SectData) ? " [Data]" :
(bb->sect_kind == Vg_SectBSS) ? " [BSS]" :
(bb->sect_kind == Vg_SectGOT) ? " [GOT]" :
(bb->sect_kind == Vg_SectPLT) ? " [PLT]" : "");
}
and bb->sect_kind is set by VG_(seginfo_sect_kind)(addr)
> Which objdump/nm option? static or dynamic symbol table? or both?
% nm /lib/tls/libpthread-2.3.5.so | grep 4500
00004500 t _init
Ie. static. It is not found in the dynamic one.
Josef
|