[llvm-commits] [llvm] r92933 - /llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
Evan Cheng
evan.cheng at apple.com
Thu Jan 7 11:52:07 PST 2010
Is this because the linker can't change values in read-only segments? Could you illustrate with an example? Test case(s) for this and / or 92934?
Evan
On Jan 7, 2010, at 11:44 AM, Eric Christopher wrote:
> 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())
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list