[llvm-commits] [llvm] r92933 - /llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp

Eric Christopher echristo at apple.com
Thu Jan 7 11:44:06 PST 2010


Author: echristo
Date: Thu Jan  7 13:44:05 2010
New Revision: 92933

URL: http://llvm.org/viewvc/llvm-project?rev=92933&view=rev
Log:
We need to put any kind of data with a relocation into a
not-readonly segment on darwin.

Modified:
    llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp

Modified: llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp?rev=92933&r1=92932&r2=92933&view=diff

==============================================================================
--- llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp Thu Jan  7 13:44:05 2010
@@ -922,7 +922,7 @@
 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())





More information about the llvm-commits mailing list