diff options
Diffstat (limited to 'lib/Target/XCore/XCoreTargetObjectFile.cpp')
-rw-r--r-- | lib/Target/XCore/XCoreTargetObjectFile.cpp | 8 |
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; } |