summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/ELFAsmParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCParser/ELFAsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/ELFAsmParser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCParser/ELFAsmParser.cpp b/llvm/lib/MC/MCParser/ELFAsmParser.cpp
index b9fa49e131b..1e69c384608 100644
--- a/llvm/lib/MC/MCParser/ELFAsmParser.cpp
+++ b/llvm/lib/MC/MCParser/ELFAsmParser.cpp
@@ -498,16 +498,16 @@ bool ELFAsmParser::ParseSectionArguments(bool IsPush, SMLoc loc) {
// Set the defaults first.
if (hasPrefix(SectionName, ".rodata.") || SectionName == ".rodata1")
Flags |= ELF::SHF_ALLOC;
- if (SectionName == ".fini" || SectionName == ".init" ||
+ else if (SectionName == ".fini" || SectionName == ".init" ||
hasPrefix(SectionName, ".text."))
Flags |= ELF::SHF_ALLOC | ELF::SHF_EXECINSTR;
- if (hasPrefix(SectionName, ".data.") || SectionName == ".data1" ||
+ else if (hasPrefix(SectionName, ".data.") || SectionName == ".data1" ||
hasPrefix(SectionName, ".bss.") ||
hasPrefix(SectionName, ".init_array.") ||
hasPrefix(SectionName, ".fini_array.") ||
hasPrefix(SectionName, ".preinit_array."))
Flags |= ELF::SHF_ALLOC | ELF::SHF_WRITE;
- if (hasPrefix(SectionName, ".tdata.") ||
+ else if (hasPrefix(SectionName, ".tdata.") ||
hasPrefix(SectionName, ".tbss."))
Flags |= ELF::SHF_ALLOC | ELF::SHF_WRITE | ELF::SHF_TLS;
OpenPOWER on IntegriCloud