[PATCH] D93362: [llvm-elfabi] Support ELF file that lacks .gnu.hash section

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 10:35:19 PST 2021


MaskRay requested changes to this revision.
MaskRay added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/include/llvm/Object/ELF.h:541
+  // Locate the end of the chain to find the last symbol index.
+  while (It <= BufEnd && (*It & 1) == 0) {
+    ++LastSymIdx;
----------------
This looks wrong. `It < BufEnd`


================
Comment at: llvm/include/llvm/Object/ELF.h:545
+  }
+  if (It > BufEnd) {
+    return createStringError(
----------------
`It >= BufEnd`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93362/new/

https://reviews.llvm.org/D93362



More information about the llvm-commits mailing list