diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-08-18 14:06:12 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-08-18 14:06:12 +0000 |
commit | 848c29396271b8255653b6c6b61b5482bd72c293 (patch) | |
tree | c5648e26daed5130e2fea545e53e925937864681 /lib/Target/TargetLoweringObjectFile.cpp | |
parent | b2bacd926309a6cd89507b182f5c4ace010884fc (diff) |
Text sections should have 'exec' flag set. This seems to unbreak libstdc++ on linux.
Patch by Dmitry Gorbachev!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | lib/Target/TargetLoweringObjectFile.cpp | 3 |
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; |