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

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 10:39:33 PDT 2015


ikudrin added inline comments.

================
Comment at: ELF/OutputSections.cpp:247
@@ +246,3 @@
+      sizeof(Elf_Word) == sizeof(Elf_Off) ? sizeof(Elf_Word) : 0;
+  this->Header.sh_addralign = sizeof(Elf_Off);
+}
----------------
ruiu wrote:
> This is always 2, no? Is this correct?
Hmm, no. It's 8 on 64-bit platform and 4 on 32-bit.

================
Comment at: ELF/OutputSections.cpp:357
@@ +356,3 @@
+  auto *const Buckets = reinterpret_cast<Elf_Word *>(Buf);
+  auto *const Values = Buckets + NBuckets;
+
----------------
ruiu wrote:
> auto -> unsigned
It's not unsigned but Elf_Word.

================
Comment at: ELF/Writer.cpp:486
@@ +485,3 @@
+      } else {
+        Body->setDynamicSymbolTableIndex(++DynamicSymbolTableIndex);
+      }
----------------
ruiu wrote:
> Why do we have to call setDynamicSymbolTableIndex here? That's not obvious.
Please see my last patch, it's straightforward on that question.


http://reviews.llvm.org/D13815





More information about the llvm-commits mailing list