This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Failures with exelib.exp testcase (was Re: minutes 2010-08-19)
On Tue, Feb 08, 2011 at 02:13:35PM +0100, Mark Wielaard wrote:
> On Thu, 2011-02-03 at 10:59 -0800, Roland McGrath wrote:
> > What you need to do is:
> >
> > Elf64_Addr opd_addr;
> > Dwarf_Addr bias;
> > Elf_Scn *opd = dwfl_module_address_section (mod, &sym_addr, &bias);
> > if (opd == NULL) ...;
> > Elf_Data *data = elf_rawdata (opd, NULL);
> > if (data == NULL) ...;
> > Elf_Data in, out;
> > out.d_buf = &final_addr;
> > in.d_buf = (char *) data->d_buf + sym_addr;
> > out.d_size = in.d_size = sizeof (Elf64_Addr);
> > out.d_type = in.d_type = ELF_T_ADDR;
> > if (elf64_xlatetom (elf, &out, &in, e_ident[EI_DATA]) == NULL) ...;
> > sym_addr = opd_addr + bias;
>
> Thanks for the pseudocode example. Prasad, is that enough for you to
> take a stab at hacking up a solution for the powerpc symbol lookup
> issue?
>
So basically this would turn out into a piece of code to derive symbol
address in, say dump_unwindsyms() in translate.cxx specific to
__powerpc__ (or so I understand)?
I'll give this a try and report what happens.
Thanks for all the help.
-- K.Prasad