summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-11-18 06:02:15 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-11-18 06:02:15 +0000
commit449711cb366962c841e7c6b9c1271484d2965c54 (patch)
tree431bb6aa43feca0657676cb7f1aceb0521050d0f /llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp
parente113b5e9afeda18d249aca75d473350b94fcda5f (diff)
downloadbcm5719-llvm-449711cb366962c841e7c6b9c1271484d2965c54.tar.gz
bcm5719-llvm-449711cb366962c841e7c6b9c1271484d2965c54.zip
Stop producing .data.rel sections.
If a section is rw, it is irrelevant if the dynamic linker will write to it or not. It looks like llvm implemented this because gcc was doing it. It looks like gcc implemented this in the hope that it would put all the relocated items close together and speed up the dynamic linker. There are two problem with this: * It doesn't work. Both bfd and gold will map .data.rel to .data and concatenate the input sections in the order they are seen. * If we want a feature like that, it can be implemented directly in the linker since it knowns where the dynamic relocations are. llvm-svn: 253436
Diffstat (limited to 'llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp')
-rw-r--r--llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp b/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp
index eb3072195dc..aa16ecc148d 100644
--- a/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp
+++ b/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp
@@ -129,13 +129,15 @@ XCoreTargetObjectFile::SelectSectionForGlobal(const GlobalValue *GV,
if (Kind.isReadOnly()) return UseCPRel? ReadOnlySection
: DataRelROSection;
if (Kind.isBSS() || Kind.isCommon())return BSSSection;
- if (Kind.isDataRel()) return DataSection;
+ if (Kind.isData())
+ return DataSection;
if (Kind.isReadOnlyWithRel()) return DataRelROSection;
} else {
if (Kind.isReadOnly()) return UseCPRel? ReadOnlySectionLarge
: DataRelROSectionLarge;
if (Kind.isBSS() || Kind.isCommon())return BSSSectionLarge;
- if (Kind.isDataRel()) return DataSectionLarge;
+ if (Kind.isData())
+ return DataSectionLarge;
if (Kind.isReadOnlyWithRel()) return DataRelROSectionLarge;
}
OpenPOWER on IntegriCloud