From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1461 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: ldso : dladdr support Date: Wed, 8 Aug 2012 08:49:54 -0400 Message-ID: <20120808124954.GG27715@brightrain.aerifal.cx> References: <5020DA13.6080803@gmail.com> <20120807114627.GG30810@port70.net> <50212306.6070402@gmail.com> <20120807230933.GC27715@brightrain.aerifal.cx> <502237A1.1000805@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 1344430161 12885 80.91.229.3 (8 Aug 2012 12:49:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2012 12:49:21 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1462-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 08 14:49:21 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 1Sz5hP-000893-GB for gllmg-musl@plane.gmane.org; Wed, 08 Aug 2012 14:49:19 +0200 Original-Received: (qmail 24325 invoked by uid 550); 8 Aug 2012 12:49:18 -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 24317 invoked from network); 8 Aug 2012 12:49:18 -0000 Content-Disposition: inline In-Reply-To: <502237A1.1000805@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1461 Archived-At: On Wed, Aug 08, 2012 at 11:55:45AM +0200, musl wrote: > > Also, we had a conversation on the list and/or IRC a while back (I > > don't remember which) where I described some optimizations that should > > be present if gnu hash is to be supported. Basically, the dynamic > > linker should keep track of whether there's one of the two hashes > > that's supported by ALL loaded libs, and in that case, only ever use > > that hash, to avoid computing two different hashes. > The hash for given algo is only computed once (if needed). > That's the reason for the computed table. > If all libs uses the same hash algo, the other will never be computed. All libs can have both algos (and MUST, if they use gnu hash at all, in order to be conformant; the only reason this code is needed is to support non-conformant lib files that lack standard ELF (sysv) hash). The case I'm talking about is where 10 libs are loaded, and 9 of them have both hashes but the last only has sysv. In that case, sysv should get used and gnu should never get computed, or at least that was my thought/intent. > I added the precomp table wich includes both gnu and sysv hashes for the dlopen, > dlsym and __stack_chk_fail symbols. Indeed, that seems to be correct now. I'll give the patch a better review soon. Rich