Index: src/IceELFObjectWriter.cpp |
diff --git a/src/IceELFObjectWriter.cpp b/src/IceELFObjectWriter.cpp |
index cb36e3d92a0cf7aa68fdce4af2db63d859677a85..611121ad094c144cf7c4baba4c828d97a860c6b0 100644 |
--- a/src/IceELFObjectWriter.cpp |
+++ b/src/IceELFObjectWriter.cpp |
@@ -330,7 +330,7 @@ void ELFObjectWriter::writeDataOfType(SectionType ST, |
case ROData: { |
const IceString SectionName = |
MangleSectionName(IsPIC ? ".data.rel.ro" : ".rodata", SectionSuffix); |
- const Elf64_Xword ShFlags = SHF_ALLOC | (IsPIC ? SHF_WRITE : 0); |
+ const Elf64_Xword ShFlags = IsPIC ? (SHF_ALLOC | SHF_WRITE) : SHF_ALLOC; |
Section = createSection<ELFDataSection>(SectionName, SHT_PROGBITS, ShFlags, |
ShAddralign, ShEntsize); |
Section->setFileOffset(alignFileOffset(ShAddralign)); |