[PATCH] D13815: [ELF2] Add support for Gnu Hash section
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 18 06:44:19 PDT 2015
> +template <class ELFT>
> +const unsigned GnuHashTableSection<ELFT>::NBucketsEstimation[] = {
> + 1, // 0.. 1
> + 1, // 2
> + 3, // 3.. 4
> + 3, // 5.. 8
> + 7, // 9.. 16
> + 13, // 17.. 32
> + 31, // 33.. 64
> + 61, // 65.. 128
> + 127, // 129.. 256
> + 251, // 257.. 512
> + 509, // 513.. 1024
> + 1021, // 1025.. 2048
> + 2039, // 2049.. 4096
> + 4093, // 4097.. 8192
> + 8191, // 8193.. 16384
> + 16381, // 16385.. 32768
> + 32749, // 32769.. 65536
> + 65521, // 65537..131072
> + 131071 // 131073..
> +};
> +
> ----------------
> ruiu wrote:
>> Where does this implementation come from?
> I've just selected prime numbers which are not greater than lower bound of each range. Haven't done any deep investigations, it just looks reasonable for the first try.
Please add that as a comment.
Cheers,
Rafael
More information about the llvm-commits
mailing list