This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DT_GNU_HASH latest patches


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]