mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Add ARM TARGET2 relocation. The testcase will follow with actualy use-case.
Based on the patch by Logan Chien! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167633 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
64f03673d2
commit
12cfa11960
@ -167,6 +167,7 @@ public:
|
||||
VK_ARM_TPOFF,
|
||||
VK_ARM_GOTTPOFF,
|
||||
VK_ARM_TARGET1,
|
||||
VK_ARM_TARGET2,
|
||||
|
||||
VK_PPC_TOC, // TOC base
|
||||
VK_PPC_TOC_ENTRY, // TOC entry
|
||||
|
@ -60,7 +60,8 @@ void MCExpr::print(raw_ostream &OS) const {
|
||||
SRE.getKind() == MCSymbolRefExpr::VK_ARM_GOTOFF ||
|
||||
SRE.getKind() == MCSymbolRefExpr::VK_ARM_TPOFF ||
|
||||
SRE.getKind() == MCSymbolRefExpr::VK_ARM_GOTTPOFF ||
|
||||
SRE.getKind() == MCSymbolRefExpr::VK_ARM_TARGET1)
|
||||
SRE.getKind() == MCSymbolRefExpr::VK_ARM_TARGET1 ||
|
||||
SRE.getKind() == MCSymbolRefExpr::VK_ARM_TARGET2)
|
||||
OS << MCSymbolRefExpr::getVariantKindName(SRE.getKind());
|
||||
else if (SRE.getKind() != MCSymbolRefExpr::VK_None &&
|
||||
SRE.getKind() != MCSymbolRefExpr::VK_PPC_DARWIN_HA16 &&
|
||||
@ -199,6 +200,7 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) {
|
||||
case VK_ARM_GOTTPOFF: return "(gottpoff)";
|
||||
case VK_ARM_TLSGD: return "(tlsgd)";
|
||||
case VK_ARM_TARGET1: return "(target1)";
|
||||
case VK_ARM_TARGET2: return "(target2)";
|
||||
case VK_PPC_TOC: return "tocbase";
|
||||
case VK_PPC_TOC_ENTRY: return "toc";
|
||||
case VK_PPC_DARWIN_HA16: return "ha16";
|
||||
|
@ -246,6 +246,9 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
|
||||
case MCSymbolRefExpr::VK_ARM_TARGET1:
|
||||
Type = ELF::R_ARM_TARGET1;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_ARM_TARGET2:
|
||||
Type = ELF::R_ARM_TARGET2;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ARM::fixup_arm_ldst_pcrel_12:
|
||||
|
Loading…
x
Reference in New Issue
Block a user