This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: DT_GNU_HASH latest patches
- From: Jakub Jelinek <jakub at redhat dot com>
- To: djamel anonymous <djam8193ah at hotmail dot com>
- Cc: binutils at sources dot redhat dot com, drepper at redhat dot com, michael dot meeks at novell dot com, libc-alpha at sources dot redhat dot com
- Date: Mon, 10 Jul 2006 00:27:03 +0200
- Subject: Re: DT_GNU_HASH latest patches
- References: <20060707144406.GO3823@sunsite.mff.cuni.cz> <BAY22-F16DE665E643A6BED43D5BCC7740@phx.gbl>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jul 07, 2006 at 03:56:59PM +0000, djamel anonymous wrote:
> Hello, first i thank you for testing my suggestion.in the patch, i have
> noted the current line
> cinfo.maskbits = bfd_log2 (cinfo.nsyms) + 1;
bfd_log2 is not 32 - __builtin_clz.
cinfo.maskbits = bfd_log2 (cinfo.nsyms) + 1;
if (cinfo.maskbits < 3)
cinfo.maskbits = 1 << 5;
else if ((1 << (cinfo.maskbits - 2)) & cinfo.nsyms)
cinfo.maskbits = 1 << (cinfo.maskbits + 3);
else
cinfo.maskbits = 1 << (cinfo.maskbits + 2);
gives you approx. NSYMS bytes in the bitmask
(between NSYMS*(2/3)*8 and NSYMS*(4/3)*8 bits).
Jakub