aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/TargetLoweringObjectFile.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp
index ff0180bc0f..67fbc1f6ca 100644
--- a/lib/Target/TargetLoweringObjectFile.cpp
+++ b/lib/Target/TargetLoweringObjectFile.cpp
@@ -487,6 +487,9 @@ getELFSectionFlags(SectionKind K) {
if (!K.isMetadata())
Flags |= MCSectionELF::SHF_ALLOC;
+ if (K.isText())
+ Flags |= MCSectionELF::SHF_EXECINSTR;
+
if (K.isWriteable())
Flags |= MCSectionELF::SHF_WRITE;