Fix thinko.
This would match SHF_ALLOC or SHF_TLS. We want both.
llvm-svn: 251939
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index d3da0e1..7a8a434 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -700,7 +700,8 @@
}
}
- 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)