[PATCH] D13815: [ELF2] Add support for Gnu Hash section

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 08:23:31 PDT 2015


rafael added inline comments.

================
Comment at: ELF/OutputSections.cpp:324
@@ +323,3 @@
+  // GNU Hash table requirement: it should be power of 2.
+  return static_cast<unsigned>(NextPowerOf2((NumHashed - 1) / sizeof(Elf_Off)));
+}
----------------
ikudrin wrote:
> On the fresh look, I've forgotten about the requirement for this value to be a power of 2.
Why the -1?
Why the static_cast?



http://reviews.llvm.org/D13815





More information about the llvm-commits mailing list