[PATCH] D13815: [ELF2] Add support for Gnu Hash section
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 12:58:10 PDT 2015
ikudrin added inline comments.
================
Comment at: ELF/OutputSections.cpp:237
@@ +236,3 @@
+ H = (H << 5) + H + C;
+ return H & 0xffffffff;
+}
----------------
ruiu wrote:
> ikudrin wrote:
> > rafael wrote:
> > > Given that you are using a uint32_t, this is a nop, no?
> > Thanks for reminding. The reference implementation uses uint_fast32_t, I think we should do the same.
> Unlike uint_fast32_t, uint32_t is always 32-bit. You don't need this mask.
Yep, but I'd prefer to replace the H's type with uint_fast32_t. What do you think?
================
Comment at: ELF/OutputSections.cpp:258-259
@@ +257,4 @@
+ static const unsigned Primes[] = {
+ 1, 1, 3, 3, 7, 13, 31, 61, 127, 251,
+ 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071};
+
----------------
ruiu wrote:
> No need to align them vertically.
It's what clang-format does.
http://reviews.llvm.org/D13815
More information about the llvm-commits
mailing list