From owner-freebsd-current@FreeBSD.ORG Sun Oct 3 19:33:07 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8834A16A4CE for ; Sun, 3 Oct 2004 19:33:07 +0000 (GMT) Received: from mwinf0806.wanadoo.fr (smtp8.wanadoo.fr [193.252.22.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2C9643D2F for ; Sun, 3 Oct 2004 19:33:06 +0000 (GMT) (envelope-from dak@wanadoo.fr) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0806.wanadoo.fr (SMTP Server) with SMTP id C81E71800112 for ; Sun, 3 Oct 2004 21:33:05 +0200 (CEST) Received: from smtp.wanadoo.fr (ca-sqy-2-245.w80-8.abo.wanadoo.fr [80.8.55.245]) by mwinf0806.wanadoo.fr (SMTP Server) with ESMTP id 956BD18001AD for ; Sun, 3 Oct 2004 21:33:05 +0200 (CEST) Received: from nebula.wanadoo.fr (localhost [127.0.0.1]) by smtp.wanadoo.fr (8.13.1/8.13.1) with ESMTP id i93JX47t001232 for ; Sun, 3 Oct 2004 21:33:05 +0200 (CEST) (envelope-from dak@nebula.wanadoo.fr) Received: (from dak@localhost) by nebula.wanadoo.fr (8.13.1/8.13.1/Submit) id i93JX4Lb001231 for current@freebsd.org; Sun, 3 Oct 2004 21:33:04 +0200 (CEST) (envelope-from dak) Date: Sun, 3 Oct 2004 21:33:04 +0200 From: Aurelien Nephtali To: current@freebsd.org Message-ID: <20041003193304.GA1202@nebula.wanadoo.fr> References: <20041003164006.GA20441@nebula.wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041003164006.GA20441@nebula.wanadoo.fr> User-Agent: Mutt/1.5.6i Subject: Re: .symtab section is now broken ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Oct 2004 19:33:07 -0000 I fixed the problem by linking with -static but I'm sure that before I wasn't using this. On Sun, Oct 03, 2004 at 06:40:06PM +0200, Aurelien NEPHTALI wrote: > Hi, > > I have coded some tools that read ELF binaries. Thet used to work 1 or 2 years > ago but now they don't. These tools parse an ELF file to get addresses of > malloc(),free(),etc into the PLT to put breakpoint on them. > > The problem comes from the .symtab section. I'm using this struct to read > symbols: > > typedef struct s_symhdr > { > unsigned int st_name; > unsigned int st_value; > unsigned int st_size; > unsigned char st_info; > unsigned char st_other; > unsigned short st_shndx; > } t_symhdr; > > Before, the field 'st_value' contained the symbol's address into the PLT, > now it's null, ie (readelf output): > > 71: 00000000 41 FUNC GLOBAL DEFAULT UND malloc > ^^^^^^^^ > value > > I was suspecting the new gcc so I installed gcc 2.95 but it's the same problem. > > Is there a reason ? What to do to still get the value I want ? > > I have tested on NetBSD 1.6.1 and it works fine. > > Thanks. > > -- > NEPHTALI 'dak' Aurelien > TEK2 - Promo 2008 > 06.19.84.90.10 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" -- NEPHTALI 'dak' Aurelien TEK2 - Promo 2008 06.19.84.90.10