mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
switch off of 'Section' onto MCSection. We're not properly using
MCSection subclasses yet, but this is a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77708 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -8,10 +8,14 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "XCoreTargetObjectFile.h"
|
||||
#include "XCoreSubtarget.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
using namespace llvm;
|
||||
|
||||
|
||||
XCoreTargetObjectFile::XCoreTargetObjectFile(bool isXS1A) {
|
||||
void XCoreTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM){
|
||||
TargetLoweringObjectFileELF::Initialize(Ctx, TM);
|
||||
|
||||
TextSection = getOrCreateSection("\t.text", true, SectionKind::Text);
|
||||
DataSection = getOrCreateSection("\t.dp.data", false, SectionKind::DataRel);
|
||||
BSSSection_ = getOrCreateSection("\t.dp.bss", false, SectionKind::BSS);
|
||||
@ -22,11 +26,11 @@ XCoreTargetObjectFile::XCoreTargetObjectFile(bool isXS1A) {
|
||||
TLSDataSection = DataSection;
|
||||
TLSBSSSection = BSSSection_;
|
||||
|
||||
if (isXS1A)
|
||||
if (TM.getSubtarget<XCoreSubtarget>().isXS1A())
|
||||
// FIXME: Why is this writable ("datarel")???
|
||||
ReadOnlySection = getOrCreateSection("\t.dp.rodata", false,
|
||||
SectionKind::DataRel);
|
||||
else
|
||||
ReadOnlySection = getOrCreateSection("\t.cp.rodata", false,
|
||||
SectionKind::ReadOnly);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user