From 0f83d968525877b8d4384b1e6273985a5035d478 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Wed, 27 Oct 2010 18:52:29 +0000 Subject: [PATCH] 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. llvm-svn: 117473 --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index cb53118ab549..6e94a13a89b8 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/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 |=