aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-10-27 18:52:29 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-10-27 18:52:29 +0000
commit3931b54a5f274183f850b912e0003f9aa1600584 (patch)
treecf3b5450466757bfc9325cbb82f6ea88206603ca /lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent579d7a3dccaf3c2e91ee81c026c47a0850803820 (diff)
COFF: Add IMAGE_SCN_MEM_READ to text sections.
There are currently 100 references to COFF::IMAGE_SCN in 6 files and 11 different functions. Section to attribute mapping really needs to happen in one place to avoid problems like this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--lib/CodeGen/TargetLoweringObjectFileImpl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index cb53118ab5..6e94a13a89 100644
--- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -952,6 +952,7 @@ getCOFFSectionFlags(SectionKind K) {
else if (K.isText())
Flags |=
COFF::IMAGE_SCN_MEM_EXECUTE |
+ COFF::IMAGE_SCN_MEM_READ |
COFF::IMAGE_SCN_CNT_CODE;
else if (K.isBSS ())
Flags |=