|
From: Josef W. <Jos...@gm...> - 2002-11-20 00:42:25
|
Hi,
may I ask what's the purpose of
/* Kludge ... */
si->offset=20
=3D si->start=3D=3DVG_ASSUMED_EXE_BASE ? 0 : si->start;
in vg_symtab2.c ??
I just installed glibc 2.3.1 with prelink-support on my systems.
If libraries are prelinked, valgrind doesn't load any symbols at all :-(
That's because in prelinked libraries, for a symbol entry <i>,
=09o_symtab[i].st_value
is not an offset, but a real address. So we add
=09real_address + si->offset
and get doubled addresses, and thus refused.
Not using this offset at all, and calculating a symbols address by
=09 sym_addr =3D (UInt)o_symtab[i].st_value;
=09 if (sym_addr < si->start) sym_addr +=3D si->start;
seems to be fine.=20
But I'm not comfortable with the second line: For small segment start=20
addresses, this could go wrong...
BTW, PLT and GOT ranges were always calculated wrong for executables, as =
these=20
are calculated from file offset + si->offset, and si->offset is 0 for=20
executables...
Solutions?
Josef
|