mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-31 10:34:17 +00:00
Add definition of MipsELFObjectWriter.
Patch by Reed Kotler at Mips Technologies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140891 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
09a2e0f794
commit
291512f96f
@ -1264,6 +1264,8 @@ MCObjectWriter *llvm::createELFObjectWriter(MCELFObjectTargetWriter *MOTW,
|
|||||||
case ELF::EM_PPC:
|
case ELF::EM_PPC:
|
||||||
case ELF::EM_PPC64:
|
case ELF::EM_PPC64:
|
||||||
return new PPCELFObjectWriter(MOTW, OS, IsLittleEndian); break;
|
return new PPCELFObjectWriter(MOTW, OS, IsLittleEndian); break;
|
||||||
|
case ELF::EM_MIPS:
|
||||||
|
return new MipsELFObjectWriter(MOTW, OS, IsLittleEndian); break;
|
||||||
default: llvm_unreachable("Unsupported architecture"); break;
|
default: llvm_unreachable("Unsupported architecture"); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1809,3 +1811,19 @@ unsigned X86ELFObjectWriter::GetRelocType(const MCValue &Target,
|
|||||||
|
|
||||||
return Type;
|
return Type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MipsELFObjectWriter::MipsELFObjectWriter(MCELFObjectTargetWriter *MOTW,
|
||||||
|
raw_ostream &_OS,
|
||||||
|
bool IsLittleEndian)
|
||||||
|
: ELFObjectWriter(MOTW, _OS, IsLittleEndian) {}
|
||||||
|
|
||||||
|
MipsELFObjectWriter::~MipsELFObjectWriter() {}
|
||||||
|
|
||||||
|
unsigned MipsELFObjectWriter::GetRelocType(const MCValue &Target,
|
||||||
|
const MCFixup &Fixup,
|
||||||
|
bool IsPCRel,
|
||||||
|
bool IsRelocWithSymbol,
|
||||||
|
int64_t Addend) {
|
||||||
|
// tbd
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
@ -426,6 +426,21 @@ class ELFObjectWriter : public MCObjectWriter {
|
|||||||
bool IsPCRel, bool IsRelocWithSymbol,
|
bool IsPCRel, bool IsRelocWithSymbol,
|
||||||
int64_t Addend);
|
int64_t Addend);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//===- MipsELFObjectWriter -------------------------------------------===//
|
||||||
|
|
||||||
|
class MipsELFObjectWriter : public ELFObjectWriter {
|
||||||
|
public:
|
||||||
|
MipsELFObjectWriter(MCELFObjectTargetWriter *MOTW,
|
||||||
|
raw_ostream &_OS,
|
||||||
|
bool IsLittleEndian);
|
||||||
|
|
||||||
|
virtual ~MipsELFObjectWriter();
|
||||||
|
protected:
|
||||||
|
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
|
||||||
|
bool IsPCRel, bool IsRelocWithSymbol,
|
||||||
|
int64_t Addend);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user