[lld] r263660 - [ELF] SHF_MERGE section with 0 entsize is not fatal
Ed Maste via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 13:32:32 PDT 2016
Author: emaste
Date: Wed Mar 16 15:32:32 2016
New Revision: 263660
URL: http://llvm.org/viewvc/llvm-project?rev=263660&view=rev
Log:
[ELF] SHF_MERGE section with 0 entsize is not fatal
For now just treat such sections as non-mergeable.
Differential Revision: http://reviews.llvm.org/D18222
Modified:
lld/trunk/ELF/InputFiles.cpp
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=263660&r1=263659&r2=263660&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Wed Mar 16 15:32:32 2016
@@ -148,7 +148,9 @@ template <class ELFT> static bool should
if (Flags & SHF_WRITE)
fatal("writable SHF_MERGE sections are not supported");
uintX_t EntSize = Sec.sh_entsize;
- if (!EntSize || Sec.sh_size % EntSize)
+ if (!EntSize)
+ return false;
+ if (Sec.sh_size % EntSize)
fatal("SHF_MERGE section size must be a multiple of sh_entsize");
// Don't try to merge if the aligment is larger than the sh_entsize and this
More information about the llvm-commits
mailing list