[PATCH] D79560: [Object] Remove unneeded check in ELFFile<ELFT>::dynamicEntries().

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 19:00:25 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGce86a986c39b: [Object] Remove unneeded check in ELFFile<ELFT>::dynamicEntries(). (authored by Higuoxing).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79560

Files:
  llvm/lib/Object/ELF.cpp


Index: llvm/lib/Object/ELF.cpp
===================================================================
--- llvm/lib/Object/ELF.cpp
+++ llvm/lib/Object/ELF.cpp
@@ -545,10 +545,6 @@
     // TODO: this error is untested.
     return createError("invalid empty dynamic section");
 
-  if (DynSecSize % sizeof(Elf_Dyn) != 0)
-    // TODO: this error is untested.
-    return createError("malformed dynamic section");
-
   if (Dyn.back().d_tag != ELF::DT_NULL)
     // TODO: this error is untested.
     return createError("dynamic sections must be DT_NULL terminated");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79560.262803.patch
Type: text/x-patch
Size: 561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200508/62c61dcb/attachment.bin>


More information about the llvm-commits mailing list