Set default flags for .rodata.
llvm-svn: 118395
diff --git a/llvm/lib/MC/MCParser/ELFAsmParser.cpp b/llvm/lib/MC/MCParser/ELFAsmParser.cpp
index 9883018..d6c4e45 100644
--- a/llvm/lib/MC/MCParser/ELFAsmParser.cpp
+++ b/llvm/lib/MC/MCParser/ELFAsmParser.cpp
@@ -271,9 +271,11 @@
unsigned Type = MCSectionELF::SHT_NULL;
// Set the defaults first.
- if (SectionName == ".fini" || SectionName == ".init") {
+ if (SectionName == ".fini" || SectionName == ".init" || SectionName == ".rodata") {
Type = MCSectionELF::SHT_PROGBITS;
Flags |= MCSectionELF::SHF_ALLOC;
+ }
+ if (SectionName == ".fini" || SectionName == ".init") {
Flags |= MCSectionELF::SHF_EXECINSTR;
}