From: Rui Ueyama Date: Thu, 10 Dec 2015 19:13:08 +0000 (+0000) Subject: Simplify an expression. NFC. X-Git-Tag: llvmorg-3.8.0-rc1~2238 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ccfc3261f39c2dcb1f8b02157fa25c5fb2973bf3;p=platform%2Fupstream%2Fllvm.git Simplify an expression. NFC. llvm-svn: 255282 --- diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 1a86881..b168e83 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -362,9 +362,11 @@ template static bool isRelroSection(OutputSectionBase *Sec) { typename OutputSectionBase::uintX_t Flags = Sec->getFlags(); if (!(Flags & SHF_ALLOC) || !(Flags & SHF_WRITE)) return false; + if (Flags & SHF_TLS) + return true; uint32_t Type = Sec->getType(); - if ((Flags & SHF_TLS) || (Type == SHT_INIT_ARRAY || Type == SHT_FINI_ARRAY || - Type == SHT_PREINIT_ARRAY)) + if (Type == SHT_INIT_ARRAY || Type == SHT_FINI_ARRAY || + Type == SHT_PREINIT_ARRAY) return true; if (Sec == Out::GotPlt) return Config->ZNow;