[PATCH] D80059: [ELF] Parse SHT_GNU_verneed and respect versioned undefined symbols in shared objects
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 22 10:10:46 PDT 2020
MaskRay added inline comments.
================
Comment at: lld/ELF/InputFiles.cpp:1226
+ if (!dataOrErr)
+ return {};
+
----------------
grimar wrote:
> 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?
Sorry, missed this. The first test (`ShOffset: 0xFFFFFFFF) tested this scenario. It will indeed break `LLVM_ENABLE_ABI_BREAKING_CHECKS` builds (which I can't test now because of some unrelated llvm-tblgen problems)
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