summaryrefslogtreecommitdiff
path: root/lib/Target/TargetLoweringObjectFile.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-01-07 19:44:05 +0000
committerEric Christopher <echristo@apple.com>2010-01-07 19:44:05 +0000
commita07b7504050e10508144b294b2c7996fe8794e0c (patch)
treec05e7dc6bc4046ea8e6f06ffe1ebccadb3a10f62 /lib/Target/TargetLoweringObjectFile.cpp
parent0386f01e061513094504bc11f8352a40173cada7 (diff)
downloadllvm-a07b7504050e10508144b294b2c7996fe8794e0c.tar.gz
llvm-a07b7504050e10508144b294b2c7996fe8794e0c.tar.bz2
llvm-a07b7504050e10508144b294b2c7996fe8794e0c.tar.xz
We need to put any kind of data with a relocation into a
not-readonly segment on darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r--lib/Target/TargetLoweringObjectFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp
index f887523c5b..229b1d52c5 100644
--- a/lib/Target/TargetLoweringObjectFile.cpp
+++ b/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())