relocation refers to undefined symbol

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

relocation refers to undefined symbol

Li Guanglei
Hi,

Today I tried to add probe points to some functions in modules, ex:

probe module("scsi_mod").function("scsi_dispatch_cmd")
{
   log("here")
}

but stap will give the error:

root:/root>stap a.stp
WARNING: cannot find module scsi_mod debuginfo: relocation refers to
undefined symbol
semantic error: no match for probe point
         while: resolving probe point
module("scsi_mod").function("scsi_dispatch_cmd")
Pass 2: analysis failed.  Try again with '-v' (verbose) option.

I tried to probe module("sd_mod").function("*"), it succeed.

But when tried to probe module("ext3").function("*"), I got the same
error.

After looked into the systemTap src, I found this error was generated
by calling __libdwfl_relocate:

Breakpoint 4, load_dw (mod=0x9aeff90, debugfile=0x9aeffc4) at
dwfl_module_getdwarf.c:306
306     result = __libdwfl_relocate (mod, debugfile->elf);
(gdb) p result
$72 = DWFL_E_NOERROR
(gdb) p *debugfile
$73 = {name = 0x9af17b8
"/usr/lib/debug/lib/modules/2.6.9-22.17.EL.root/kernel/drivers/scsi/scsi_mod.ko.debug",
fd = 8, elf = 0x9af1820, bias = 0}

The environment of my systems: 2.6.9-22.17.EL, elfutils-xxx-0.116-0.1,
gcc 3.4.4, ppc64/i386

Does anybody know the reason? Seems that it's a bug of elfutils.
Thanks in advance for your help



Reply | Threaded
Open this post in threaded view
|

Re: relocation refers to undefined symbol

Li Guanglei

> 306     result = __libdwfl_relocate (mod, debugfile->elf);
> (gdb) p result
> $72 = DWFL_E_NOERROR
sorry, it should be DWFL_E_RELUNDEF
> (gdb) p *debugfile