public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* probe point "process(PATH).library("/lib64/libc.so.6").function("open") no match ERROR.
@ 2013-08-14 17:15 maliubiao
  2013-08-18  0:05 ` Frank Ch. Eigler
  0 siblings, 1 reply; 2+ messages in thread
From: maliubiao @ 2013-08-14 17:15 UTC (permalink / raw)
  To: systemtap

I am trying to trace functions in libc .
Do nm /lib64/libc.so.6 |grep open ,  actually there is a weak symbol open,
When I use malloc instead of open in function("open"),  It works ,  in
the handler  the result of probefunc() is __libc_malloc.
__libc_malloc is a T symbol, which is in the CODE segment.

Is there a way  to trace weak symbol  or  to find out  what symbol  do
a weak symbol actually refer to?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: probe point "process(PATH).library("/lib64/libc.so.6").function("open") no match ERROR.
  2013-08-14 17:15 probe point "process(PATH).library("/lib64/libc.so.6").function("open") no match ERROR maliubiao
@ 2013-08-18  0:05 ` Frank Ch. Eigler
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2013-08-18  0:05 UTC (permalink / raw)
  To: maliubiao; +Cc: systemtap, scox


maliubiao wrote:

> I am trying to trace functions in libc .
> Do nm /lib64/libc.so.6 |grep open ,  actually there is a weak symbol open [...]

There are a couple of separate problems here.

open, aka __open, is a function defined in assembly language (glibc
../sysdeps/unix/syscall-template.S), for which no DWARF debuginfo is
being emitted by glibc's build process.  (It should be; they should
use ASFLAGS+=--gdwarf2.)  Systemtap cannot properly see these:
http://sourceware.org/bugzilla/show_bug.cgi?id=10208.

We also have a shared-library-PLT based mechanism:
   probe process("/lib64/libc.so.6").plt("open") { }
This should resolve.  However, due to verification associated with
the prior PR, this gets rejected (and indeed very few .plt("*")
probes resolve for glibc).  Stan, can we do something about this?


> Is there a way to trace weak symbol or to find out what symbol do a
> weak symbol actually refer to?

Weak symbols per se are not a big problem.  We already handle those
to some extent.


- FChE

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-18  0:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-14 17:15 probe point "process(PATH).library("/lib64/libc.so.6").function("open") no match ERROR maliubiao
2013-08-18  0:05 ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).