16#define DEBUG_TYPE "csky-elf-object-writer"
24 CSKYELFObjectWriter(
uint8_t OSABI = 0)
26 ~CSKYELFObjectWriter() {}
34unsigned CSKYELFObjectWriter::getRelocType(
MCContext &Ctx,
48 return ELF::R_CKCORE_NONE;
51 return ELF::R_CKCORE_PCREL32;
53 return ELF::R_CKCORE_PCREL_IMM16_4;
55 return ELF::R_CKCORE_PCREL_IMM8_4;
57 return ELF::R_CKCORE_PCREL_IMM26_2;
59 return ELF::R_CKCORE_PCREL_IMM18_2;
61 return ELF::R_CKCORE_PCREL_IMM16_2;
63 return ELF::R_CKCORE_PCREL_IMM10_2;
65 return ELF::R_CKCORE_PCREL_IMM7_4;
73 return ELF::R_CKCORE_NONE;
76 return ELF::R_CKCORE_NONE;
79 return ELF::R_CKCORE_NONE;
82 auto TK = cast<CSKYMCExpr>(Expr)->getKind();
84 return ELF::R_CKCORE_ADDR32;
86 return ELF::R_CKCORE_GOT32;
88 return ELF::R_CKCORE_GOTOFF;
90 return ELF::R_CKCORE_PLT32;
92 return ELF::R_CKCORE_TLS_IE32;
94 return ELF::R_CKCORE_TLS_LE32;
96 return ELF::R_CKCORE_TLS_GD32;
98 return ELF::R_CKCORE_TLS_LDM32;
100 return ELF::R_CKCORE_TLS_LDO32;
102 return ELF::R_CKCORE_GOTPC;
104 return ELF::R_CKCORE_ADDR32;
112 "invalid fixup for 4-byte data relocation");
113 return ELF::R_CKCORE_NONE;
115 return ELF::R_CKCORE_GOT32;
117 return ELF::R_CKCORE_GOTOFF;
119 return ELF::R_CKCORE_PLT32;
121 return ELF::R_CKCORE_TLS_GD32;
123 return ELF::R_CKCORE_TLS_LDM32;
125 return ELF::R_CKCORE_TLS_LE32;
127 return ELF::R_CKCORE_ADDR32;
130 return ELF::R_CKCORE_NONE;
133 return ELF::R_CKCORE_NONE;
135 return ELF::R_CKCORE_ADDR32;
137 return ELF::R_CKCORE_ADDR_HI16;
139 return ELF::R_CKCORE_ADDR_LO16;
141 return ELF::R_CKCORE_DOFFSET_IMM18;
143 return ELF::R_CKCORE_DOFFSET_IMM18_2;
145 return ELF::R_CKCORE_DOFFSET_IMM18_4;
147 return ELF::R_CKCORE_GOT_IMM18_4;
149 return ELF::R_CKCORE_PLT_IMM18_4;
154 return std::make_unique<CSKYELFObjectWriter>();
PowerPC TLS Dynamic Call Fixup
Context object for machine code objects.
void reportError(SMLoc L, const Twine &Msg)
virtual unsigned getRelocType(MCContext &Ctx, const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const =0
Base class for the full range of assembler expressions which are needed for parsing.
@ Target
Target specific expression.
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
This represents an "assembler immediate".
Target - Wrapper for Target specific information.
@ fixup_csky_pcrel_imm10_scale2
@ fixup_csky_pcrel_uimm7_scale4
@ fixup_csky_doffset_imm18_scale2
@ fixup_csky_pcrel_imm16_scale2
@ fixup_csky_pcrel_imm18_scale2
@ fixup_csky_doffset_imm18_scale4
@ fixup_csky_pcrel_uimm16_scale4
@ fixup_csky_plt_imm18_scale4
@ fixup_csky_pcrel_imm26_scale2
@ fixup_csky_got_imm18_scale4
@ fixup_csky_pcrel_uimm8_scale4
@ fixup_csky_doffset_imm18
This is an optimization pass for GlobalISel generic memory operations.
std::unique_ptr< MCObjectTargetWriter > createCSKYELFObjectWriter()
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
@ FK_PCRel_4
A four-byte pc relative fixup.
@ FK_Data_8
A eight-byte fixup.
@ FK_Data_1
A one-byte fixup.
@ FK_Data_4
A four-byte fixup.
@ FK_Data_2
A two-byte fixup.