summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetAsmInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-27 17:39:40 +0000
committerChris Lattner <sabre@nondot.org>2009-07-27 17:39:40 +0000
commite48c85fa8be7ddb4ff296f6b95fedfed7747b1d1 (patch)
treec510fe0f06bd7ad3601b6916ff463a0050e99f5f /llvm/lib/Target/TargetAsmInfo.cpp
parentde6f46c32e0a493b28889ea304aec8a6e91cf36d (diff)
downloadbcm5719-llvm-e48c85fa8be7ddb4ff296f6b95fedfed7747b1d1.tar.gz
bcm5719-llvm-e48c85fa8be7ddb4ff296f6b95fedfed7747b1d1.zip
add an explanatory comment about why we drop these in readonly and
not in mergable llvm-svn: 77210
Diffstat (limited to 'llvm/lib/Target/TargetAsmInfo.cpp')
-rw-r--r--llvm/lib/Target/TargetAsmInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp
index ce905effa79..f5c1458e3d8 100644
--- a/llvm/lib/Target/TargetAsmInfo.cpp
+++ b/llvm/lib/Target/TargetAsmInfo.cpp
@@ -247,7 +247,9 @@ static SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV,
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 @@ static SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV,
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;
OpenPOWER on IntegriCloud