public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Eugeniy Meshcheryakov <eugeniy.meshcheryakov@googlemail.com>
To: "Stone, Joshua I" <joshua.i.stone@intel.com>
Cc: "Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>,
		Systemtap <systemtap@sources.redhat.com>
Subject: Re: Stap is translating to functions in __exit sections...and later module load fails
Date: Fri, 13 Oct 2006 23:07:00 -0000	[thread overview]
Message-ID: <20061013230704.GA3414@localhost.localdomain> (raw)
In-Reply-To: <C56DB814FAA30B418C75310AC4BB279DC4C843@scsmsx413.amr.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2035 bytes --]

13 жовтня 2006 о 15:28 -0700 Stone, Joshua I написав(-ла):
> This seems to support the notion that the linker elided that function.
> 
> So, as Eugeniy wondered, why did the translator pick up that function at
> all?  I'm also curious what IP it chose for the kprobe, if the function
> no longer exists... Please try this command:
> 
> $ stap -p2 -vv -e 'probe kernel.function("exit_pfm_fs"){}' 2>&1 | grep
> 'pc='
> 
> I suspect that either elfutils is giving 'stale' debug information, or
> the translator is misinterpreting its results.
It loks like a bug in some version of gcc. I tried to compile the
following program with version from Debian stable and unstable on ia64:

$ cat test.c
static void __attribute__((section(".exit.text"))) exit_pfm_fs(void)
{
        return;
}
$

With gcc 3.3.5:

$ readelf -a test.o | grep exit_
     9: 0000000000000000    16 FUNC    LOCAL  DEFAULT    9 exit_pfm_fs
$ objdump -W test.o
...
The section .debug_info contains:

  Compilation Unit @ offset 0x0:
   Length:        52
   Version:       2
   Abbrev Offset: 0
   Pointer Size:  8
 <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
     DW_AT_stmt_list   : 0
     DW_AT_name        : (indirect string, offset: 0x38): test.c
     DW_AT_comp_dir    : (indirect string, offset: 0x0): /home/eugen
     DW_AT_producer    : (indirect string, offset: 0xc): GNU C 3.3.5
(Debian 1:3.3.5-13)
     DW_AT_language    : 1      (ANSI C)
 <1><1d>: Abbrev Number: 2 (DW_TAG_subprogram)
     DW_AT_name        : (indirect string, offset: 0x2c): exit_pfm_fs
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 2
     DW_AT_prototyped  : 1
     DW_AT_low_pc      : 0
     DW_AT_high_pc     : 0x10
     DW_AT_frame_base  : 1 byte block: 5c       (DW_OP_reg12)
...
$

With gcc 4.1.2:

$ readelf -a t.o | grep exit_
$ objdump -W t.o | grep exit_
objdump: Error: No comp units in .debug_info section ?objdump: Error: No
comp units in .debug_info section ?$


-- 
Eugeniy Meshcheryakov

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2006-10-13 23:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-13 22:28 Stone, Joshua I
2006-10-13 22:37 ` Keshavamurthy Anil S
2006-10-13 23:07 ` Eugeniy Meshcheryakov [this message]
2006-10-16 11:27   ` bibo,mao
  -- strict thread matches above, loose matches on Subject: below --
2006-10-18  1:06 Stone, Joshua I
2006-10-18 22:15 ` Keshavamurthy Anil S
2006-10-18  0:52 Keshavamurthy, Anil S
2006-10-13 21:26 Stone, Joshua I
2006-10-13 21:56 ` Keshavamurthy Anil S
2006-10-13 21:02 Stone, Joshua I
2006-10-13 21:10 ` Keshavamurthy Anil S
2006-10-13 21:29 ` Eugeniy Meshcheryakov
2006-10-13 20:26 Keshavamurthy, Anil S

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061013230704.GA3414@localhost.localdomain \
    --to=eugeniy.meshcheryakov@googlemail.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=joshua.i.stone@intel.com \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).