From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KmsgU-0004Fc-Eu for qemu-devel@nongnu.org; Mon, 06 Oct 2008 12:11:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KmsgR-0004EG-OP for qemu-devel@nongnu.org; Mon, 06 Oct 2008 12:11:46 -0400 Received: from [199.232.76.173] (port=43195 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KmsgR-0004E9-It for qemu-devel@nongnu.org; Mon, 06 Oct 2008 12:11:43 -0400 Received: from hs-out-0708.google.com ([64.233.178.243]:49443) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KmsgR-0006BC-HA for qemu-devel@nongnu.org; Mon, 06 Oct 2008 12:11:43 -0400 Received: by hs-out-0708.google.com with SMTP id k27so1135590hsc.2 for ; Mon, 06 Oct 2008 09:11:42 -0700 (PDT) Message-ID: Date: Mon, 6 Oct 2008 19:11:42 +0300 From: "Blue Swirl" Subject: Re: Hash table based symbol lookup (was: Re: [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets) In-Reply-To: <761ea48b0810060329l5d05315euea009eb97d22799b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <761ea48b0810060329l5d05315euea009eb97d22799b@mail.gmail.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 10/6/08, Laurent Desnogues wrote: > On Fri, Oct 3, 2008 at 7:14 PM, Blue Swirl wrote: > >> > >> I have a hash-table based implementation somewhere if someone > >> wants to take a look. > > > > That would be interesting, please send. > > Here you go. > > Things to note: > > - HT building could be done by a call to syminfo_ht_build > from elfload.c/machload.c > - no cleanup code > - use of malloc > - only slightly tested > > So basically this is only for review purposes :) I hope I'm wrong, but it looks like in the worst case, for each byte that the symbol covers, this implementation can allocate a structure of tens of bytes in size. I wonder what the symbols of 1.5MB openbios-sparc64 would take.