From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1448 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: ldso : bug dependencies symbol lookup Date: Tue, 7 Aug 2012 19:12:15 -0400 Message-ID: <20120807231215.GD27715@brightrain.aerifal.cx> References: <50212C76.8050909@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1344381103 32070 80.91.229.3 (7 Aug 2012 23:11:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Aug 2012 23:11:43 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1449-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 08 01:11:43 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SyswA-0000FA-4k for gllmg-musl@plane.gmane.org; Wed, 08 Aug 2012 01:11:42 +0200 Original-Received: (qmail 32727 invoked by uid 550); 7 Aug 2012 23:11:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32716 invoked from network); 7 Aug 2012 23:11:40 -0000 Content-Disposition: inline In-Reply-To: <50212C76.8050909@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1448 Archived-At: On Tue, Aug 07, 2012 at 04:55:50PM +0200, musl wrote: > Hi, > > I think there is a bug in symbol lookup since this commit : 05eff01e89ee345e70acdbebc9c3778766b76ee2. > > if (p->deps) for (i=0; p->deps[i]; i++) { > - sym = lookup(s, h, p->deps[i]->syms, > - p->deps[i]->hashtab, p->deps[i]->strings); > + sym = lookup(s, h, p); > if (sym && sym->st_value && (1<<(sym->st_info&0xf) & OK_TYPES)) > return p->deps[i]->base + sym->st_value; > } > > this should be : > > if (p->deps) for (i=0; p->deps[i]; i++) { > - sym = lookup(s, h, p->deps[i]->syms, > - p->deps[i]->hashtab, p->deps[i]->strings); > + sym = lookup(s, h, p->deps[i]); > if (sym && sym->st_value && (1<<(sym->st_info&0xf) & OK_TYPES)) > return p->deps[i]->base + sym->st_value; > } Thanks! Fixed in git. Rich