[lld] r251939 - Fix thinko.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 3 08:30:27 PST 2015
Author: rafael
Date: Tue Nov 3 10:30:27 2015
New Revision: 251939
URL: http://llvm.org/viewvc/llvm-project?rev=251939&view=rev
Log:
Fix thinko.
This would match SHF_ALLOC or SHF_TLS. We want both.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=251939&r1=251938&r2=251939&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Nov 3 10:30:27 2015
@@ -700,7 +700,8 @@ template <class ELFT> void Writer<ELFT>:
}
}
- if (Sec->getSize() && (Sec->getFlags() & (SHF_ALLOC | SHF_TLS))) {
+ if (Sec->getSize() && (Sec->getFlags() & SHF_ALLOC) &&
+ (Sec->getFlags() & SHF_TLS)) {
if (!TlsPhdr.p_vaddr)
setPhdr(&TlsPhdr, PT_TLS, PF_R, FileOff, VA, 0, Sec->getAlign());
if (Sec->getType() != SHT_NOBITS)
More information about the llvm-commits
mailing list