[PATCH] D60274: [ELF] Implement Dependent Libraries Feature
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 5 22:58:25 PDT 2019
MaskRay added inline comments.
================
Comment at: lld/ELF/InputFiles.cpp:658
+ for (const uint8_t *P = Contents.begin(), *E = Contents.end(); P < E;) {
+ StringRef A = reinterpret_cast<const char *>(P);
+ processDepLib(A, this);
----------------
ELF/EhFrame.cpp `readString` has an example using `llvm::find(D, '\0')` to prevent out-of-bounds read in case the section is corrupted.
================
Comment at: lld/ELF/InputFiles.cpp:663
+ return &InputSection::Discarded;
+ }
+ }
----------------
Early return fixes fallthrough issue here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60274/new/
https://reviews.llvm.org/D60274
More information about the llvm-commits
mailing list