From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16478 invoked by alias); 13 Oct 2006 23:07:13 -0000 Received: (qmail 16290 invoked by uid 22791); 13 Oct 2006 23:07:12 -0000 X-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,FORGED_RCVD_HELO,SPF_NEUTRAL,TW_BJ,TW_PF,TW_TM X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 13 Oct 2006 23:07:10 +0000 Received: from mail01.m-online.net (svr21.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 93852984C5; Sat, 14 Oct 2006 01:07:07 +0200 (CEST) Received: from localhost.localdomain (ppp-88-217-38-132.dynamic.mnet-online.de [88.217.38.132]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.m-online.net (Postfix) with ESMTP id 57134B8876; Sat, 14 Oct 2006 01:07:07 +0200 (CEST) Received: from eugen by localhost.localdomain with local (Exim 4.63) (envelope-from ) id 1GYW7M-00048d-L9; Sat, 14 Oct 2006 01:07:04 +0200 Date: Fri, 13 Oct 2006 23:07:00 -0000 To: "Stone, Joshua I" Cc: "Keshavamurthy, Anil S" , Systemtap Subject: Re: Stap is translating to functions in __exit sections...and later module load fails Message-ID: <20061013230704.GA3414@localhost.localdomain> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) From: Eugeniy Meshcheryakov X-Virus-Checked: Checked by ClamAV on sourceware.org X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q4/txt/msg00121.txt.bz2 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2048 13 =D0=B6=D0=BE=D0=B2=D1=82=D0=BD=D1=8F 2006 =D0=BE 15:28 -0700 Stone, Josh= ua I =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=B2(-=D0=BB=D0=B0): > This seems to support the notion that the linker elided that function. >=20 > 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: >=20 > $ stap -p2 -vv -e 'probe kernel.function("exit_pfm_fs"){}' 2>&1 | grep > 'pc=3D' >=20 > 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>: 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 ?$ --=20 Eugeniy Meshcheryakov --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline Content-length: 189 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFMBwYKaC6+zmozOIRAoQtAJ9Wch/xtfD0ye3FeEdCczZlHmdslQCfSc46 t8JlloEoVQw8Ha0/V97DIt8= =/i/K -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3--