summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-07-15 21:22:00 +0000
committerChris Lattner <sabre@nondot.org>2010-07-15 21:22:00 +0000
commit60b131654b2f407a937c5ed505ea1c8fd6a33512 (patch)
tree5a2c8cba8b952420c978cc5112334cd5f4284e0d /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentc2b3675f8b41b7bc80d38507b4b76bf0d563d057 (diff)
downloadbcm5719-llvm-60b131654b2f407a937c5ed505ea1c8fd6a33512.tar.gz
bcm5719-llvm-60b131654b2f407a937c5ed505ea1c8fd6a33512.zip
fix the definitions of ConstTextCoalSection/ConstDataCoalSection
to keep "Text" in sync with the "pure instructions" section attribute. Lack of this attribute was preventing the assembler from emitting multibyte noops instructions for templates (and inlines, and other coalesced stuff) and was causing the assembler to mismatch .o files. This fixes rdar://8018335 llvm-svn: 108461
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index a80cfc4b256..3b25714c04b 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -518,12 +518,13 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
SectionKind::getText());
ConstTextCoalSection
= getContext().getMachOSection("__TEXT", "__const_coal",
- MCSectionMachO::S_COALESCED,
+ MCSectionMachO::S_COALESCED |
+ MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
SectionKind::getText());
ConstDataCoalSection
= getContext().getMachOSection("__DATA","__const_coal",
MCSectionMachO::S_COALESCED,
- SectionKind::getText());
+ SectionKind::getReadOnly());
ConstDataSection // .const_data
= getContext().getMachOSection("__DATA", "__const", 0,
SectionKind::getReadOnlyWithRel());
OpenPOWER on IntegriCloud