Simplify an expression. NFC.

llvm-svn: 255282
This commit is contained in:
Rui Ueyama 2015-12-10 19:13:08 +00:00
parent 9218a3bf04
commit ccfc3261f3
1 changed files with 4 additions and 2 deletions

View File

@ -362,9 +362,11 @@ template <class ELFT> static bool isRelroSection(OutputSectionBase<ELFT> *Sec) {
typename OutputSectionBase<ELFT>::uintX_t Flags = Sec->getFlags(); typename OutputSectionBase<ELFT>::uintX_t Flags = Sec->getFlags();
if (!(Flags & SHF_ALLOC) || !(Flags & SHF_WRITE)) if (!(Flags & SHF_ALLOC) || !(Flags & SHF_WRITE))
return false; return false;
if (Flags & SHF_TLS)
return true;
uint32_t Type = Sec->getType(); uint32_t Type = Sec->getType();
if ((Flags & SHF_TLS) || (Type == SHT_INIT_ARRAY || Type == SHT_FINI_ARRAY || if (Type == SHT_INIT_ARRAY || Type == SHT_FINI_ARRAY ||
Type == SHT_PREINIT_ARRAY)) Type == SHT_PREINIT_ARRAY)
return true; return true;
if (Sec == Out<ELFT>::GotPlt) if (Sec == Out<ELFT>::GotPlt)
return Config->ZNow; return Config->ZNow;