summaryrefslogtreecommitdiff
path: root/lib/Target/XCore/XCoreTargetObjectFile.cpp
diff options
context:
space:
mode:
authorRichard Osborne <richard@xmos.com>2009-08-18 17:58:17 +0000
committerRichard Osborne <richard@xmos.com>2009-08-18 17:58:17 +0000
commita9e83348770deaf7c187ff842aa9b467f813bf55 (patch)
treee954d7675d0269aff63c60632b4c472dbfe0cd62 /lib/Target/XCore/XCoreTargetObjectFile.cpp
parentdaf4f0ca6173f58a4056d4d54b94afca2df41069 (diff)
downloadllvm-a9e83348770deaf7c187ff842aa9b467f813bf55.tar.gz
llvm-a9e83348770deaf7c187ff842aa9b467f813bf55.tar.bz2
llvm-a9e83348770deaf7c187ff842aa9b467f813bf55.tar.xz
Put data with relocations in the same sections as data without relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79351 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreTargetObjectFile.cpp')
-rw-r--r--lib/Target/XCore/XCoreTargetObjectFile.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/XCore/XCoreTargetObjectFile.cpp b/lib/Target/XCore/XCoreTargetObjectFile.cpp
index 767611218a..91cb11533d 100644
--- a/lib/Target/XCore/XCoreTargetObjectFile.cpp
+++ b/lib/Target/XCore/XCoreTargetObjectFile.cpp
@@ -51,5 +51,11 @@ void XCoreTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM){
MCSectionXCore::Create(".cp.rodata", MCSectionELF::SHT_PROGBITS,
MCSectionELF::SHF_ALLOC |
MCSectionXCore::SHF_CP_SECTION,
- SectionKind::getReadOnly(), false, getContext());
+ SectionKind::getReadOnlyWithRel(), false,
+ getContext());
+
+ // Dynamic linking is not supported. Data with relocations is placed in the
+ // same section as data without relocations.
+ DataRelSection = DataRelLocalSection = DataSection;
+ DataRelROSection = DataRelROLocalSection = ReadOnlySection;
}