diff options
| author | Rui Ueyama <ruiu@google.com> | 2015-12-10 19:13:08 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2015-12-10 19:13:08 +0000 |
| commit | ccfc3261f39c2dcb1f8b02157fa25c5fb2973bf3 (patch) | |
| tree | a89dd846841679bce33c6e754183f13c9e9088a6 /lld | |
| parent | 9218a3bf04ef8f75937b07cae1df7e3c71c8c88f (diff) | |
| download | bcm5719-llvm-ccfc3261f39c2dcb1f8b02157fa25c5fb2973bf3.tar.gz bcm5719-llvm-ccfc3261f39c2dcb1f8b02157fa25c5fb2973bf3.zip | |
Simplify an expression. NFC.
llvm-svn: 255282
Diffstat (limited to 'lld')
| -rw-r--r-- | lld/ELF/Writer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 1a86881c5b4..b168e83cde2 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -362,9 +362,11 @@ template <class ELFT> static bool isRelroSection(OutputSectionBase<ELFT> *Sec) { typename OutputSectionBase<ELFT>::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<ELFT>::GotPlt) return Config->ZNow; |

