[PATCH] D13815: [ELF2] Add support for Gnu Hash section
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 16 13:57:54 PDT 2015
On Fri, Oct 16, 2015 at 07:36:43PM +0000, Rui Ueyama via llvm-commits wrote:
> ================
> Comment at: ELF/OutputSections.cpp:233
> @@ +232,3 @@
> + uint32_t H = 5381;
> + for (unsigned char C : Name)
> + H = (H << 5) + H + C;
> ----------------
> Remove unsigned.
That would change the semantic, wouldn't it?
> ================
> Comment at: ELF/OutputSections.h:263
> @@ +262,3 @@
> + static const unsigned NBucketsEstimation[];
> + static const unsigned NBucketsEstimationCount;
> + std::vector<HashData> HashedSymbols;
> ----------------
> Remove this. You can use sizeof(Primes) / sizeof(Prime[0]).
Even better: array_lengthof.
Joerg
More information about the llvm-commits
mailing list