[llvm-commits] [llvm] r77210 - /llvm/trunk/lib/Target/TargetAsmInfo.cpp
Chris Lattner
sabre at nondot.org
Mon Jul 27 10:39:49 PDT 2009
Author: lattner
Date: Mon Jul 27 12:39:40 2009
New Revision: 77210
URL: http://llvm.org/viewvc/llvm-project?rev=77210&view=rev
Log:
add an explanatory comment about why we drop these in readonly and
not in mergable
Modified:
llvm/trunk/lib/Target/TargetAsmInfo.cpp
Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=77210&r1=77209&r2=77210&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Mon Jul 27 12:39:40 2009
@@ -247,7 +247,9 @@
case Constant::LocalRelocation:
// In static relocation model, the linker will resolve all addresses, so
// the relocation entries will actually be constants by the time the app
- // starts up.
+ // starts up. However, we can't put this into a mergable section, because
+ // the linker doesn't take relocations into consideration when it tries to
+ // merge entries in the section.
if (ReloModel == Reloc::Static)
return SectionKind::ReadOnly;
@@ -258,7 +260,9 @@
case Constant::GlobalRelocations:
// In static relocation model, the linker will resolve all addresses, so
// the relocation entries will actually be constants by the time the app
- // starts up.
+ // starts up. However, we can't put this into a mergable section, because
+ // the linker doesn't take relocations into consideration when it tries to
+ // merge entries in the section.
if (ReloModel == Reloc::Static)
return SectionKind::ReadOnly;
More information about the llvm-commits
mailing list