[PATCH] D80059: [ELF] Parse SHT_GNU_verneed and respect versioned undefined symbols in shared objects

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 22 01:13:59 PDT 2020


grimar added inline comments.


================
Comment at: lld/ELF/InputFiles.cpp:1226
+  if (!dataOrErr)
+    return {};
+
----------------
This doesn't look right to me:

1) `obj.getSectionContents(sec)` returns `Expected<ArrayRef<uint8_t>>` and you do not handle an error,
the code will fail with `LLVM_ENABLE_ABI_BREAKING_CHECKS`. Do we have a test for this case?

2) Not sure why you return no entries. This invocation might fail when `sh_size` or `sh_offset` is broken.
Shouldn't we call `fatal()` too?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80059





More information about the llvm-commits mailing list