From 36ef435eca5bde7dddec79e8a095d3dc03d5294d Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 7 Jan 2010 19:44:05 +0000 Subject: [PATCH] We need to put any kind of data with a relocation into a not-readonly segment on darwin. llvm-svn: 92933 --- llvm/lib/Target/TargetLoweringObjectFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index f887523c5b71..229b1d52c5e7 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp @@ -922,7 +922,7 @@ const MCSection * TargetLoweringObjectFileMachO::getSectionForConstant(SectionKind Kind) const { // If this constant requires a relocation, we have to put it in the data // segment, not in the text segment. - if (Kind.isDataRel()) + if (Kind.isDataRel() || Kind.isReadOnlyWithRel()) return ConstDataSection; if (Kind.isMergeableConst4())