Lines Matching full:elf
1 //===-- MipsELFObjectWriter.cpp - Mips ELF Writer -------------------------===//
58 : MCELFObjectTargetWriter(_is64Bit, OSABI, ELF::EM_MIPS, in MipsELFObjectWriter()
72 return ELF::R_MIPS_NONE; in GetRelocType()
75 return IsPCRel ? ELF::R_MIPS_PC16 : ELF::R_MIPS_16; in GetRelocType()
78 return IsPCRel ? ELF::R_MIPS_PC32 : ELF::R_MIPS_32; in GetRelocType()
85 return ELF::R_MIPS_PC16; in GetRelocType()
87 return ELF::R_MICROMIPS_PC7_S1; in GetRelocType()
89 return ELF::R_MICROMIPS_PC10_S1; in GetRelocType()
91 return ELF::R_MICROMIPS_PC16_S1; in GetRelocType()
93 return ELF::R_MIPS_PC19_S2; in GetRelocType()
95 return ELF::R_MIPS_PC18_S3; in GetRelocType()
97 return ELF::R_MIPS_PC21_S2; in GetRelocType()
99 return ELF::R_MIPS_PC26_S2; in GetRelocType()
101 return ELF::R_MIPS_PCHI16; in GetRelocType()
103 return ELF::R_MIPS_PCLO16; in GetRelocType()
112 return ELF::R_MIPS_64; in GetRelocType()
115 unsigned Type = (unsigned)ELF::R_MIPS_NONE; in GetRelocType()
116 Type = setRType((unsigned)ELF::R_MIPS_GPREL32, Type); in GetRelocType()
117 Type = setRType2((unsigned)ELF::R_MIPS_64, Type); in GetRelocType()
118 Type = setRType3((unsigned)ELF::R_MIPS_NONE, Type); in GetRelocType()
121 return ELF::R_MIPS_GPREL32; in GetRelocType()
123 return ELF::R_MIPS_GPREL16; in GetRelocType()
125 return ELF::R_MIPS_26; in GetRelocType()
127 return ELF::R_MIPS_CALL16; in GetRelocType()
130 return ELF::R_MIPS_GOT16; in GetRelocType()
132 return ELF::R_MIPS_HI16; in GetRelocType()
134 return ELF::R_MIPS_LO16; in GetRelocType()
136 return ELF::R_MIPS_TLS_GD; in GetRelocType()
138 return ELF::R_MIPS_TLS_GOTTPREL; in GetRelocType()
140 return ELF::R_MIPS_TLS_TPREL_HI16; in GetRelocType()
142 return ELF::R_MIPS_TLS_TPREL_LO16; in GetRelocType()
144 return ELF::R_MIPS_TLS_LDM; in GetRelocType()
146 return ELF::R_MIPS_TLS_DTPREL_HI16; in GetRelocType()
148 return ELF::R_MIPS_TLS_DTPREL_LO16; in GetRelocType()
150 return ELF::R_MIPS_GOT_PAGE; in GetRelocType()
152 return ELF::R_MIPS_GOT_OFST; in GetRelocType()
154 return ELF::R_MIPS_GOT_DISP; in GetRelocType()
156 unsigned Type = (unsigned)ELF::R_MIPS_NONE; in GetRelocType()
157 Type = setRType((unsigned)ELF::R_MIPS_GPREL16, Type); in GetRelocType()
158 Type = setRType2((unsigned)ELF::R_MIPS_SUB, Type); in GetRelocType()
159 Type = setRType3((unsigned)ELF::R_MIPS_HI16, Type); in GetRelocType()
163 unsigned Type = (unsigned)ELF::R_MIPS_NONE; in GetRelocType()
164 Type = setRType((unsigned)ELF::R_MIPS_GPREL16, Type); in GetRelocType()
165 Type = setRType2((unsigned)ELF::R_MIPS_SUB, Type); in GetRelocType()
166 Type = setRType3((unsigned)ELF::R_MIPS_LO16, Type); in GetRelocType()
170 return ELF::R_MIPS_HIGHER; in GetRelocType()
172 return ELF::R_MIPS_HIGHEST; in GetRelocType()
174 return ELF::R_MIPS_GOT_HI16; in GetRelocType()
176 return ELF::R_MIPS_GOT_LO16; in GetRelocType()
178 return ELF::R_MIPS_CALL_HI16; in GetRelocType()
180 return ELF::R_MIPS_CALL_LO16; in GetRelocType()
182 return ELF::R_MICROMIPS_26_S1; in GetRelocType()
184 return ELF::R_MICROMIPS_HI16; in GetRelocType()
186 return ELF::R_MICROMIPS_LO16; in GetRelocType()
188 return ELF::R_MICROMIPS_GOT16; in GetRelocType()
190 return ELF::R_MICROMIPS_CALL16; in GetRelocType()
192 return ELF::R_MICROMIPS_GOT_DISP; in GetRelocType()
194 return ELF::R_MICROMIPS_GOT_PAGE; in GetRelocType()
196 return ELF::R_MICROMIPS_GOT_OFST; in GetRelocType()
198 return ELF::R_MICROMIPS_TLS_GD; in GetRelocType()
200 return ELF::R_MICROMIPS_TLS_LDM; in GetRelocType()
202 return ELF::R_MICROMIPS_TLS_DTPREL_HI16; in GetRelocType()
204 return ELF::R_MICROMIPS_TLS_DTPREL_LO16; in GetRelocType()
206 return ELF::R_MICROMIPS_TLS_TPREL_HI16; in GetRelocType()
208 return ELF::R_MICROMIPS_TLS_TPREL_LO16; in GetRelocType()
236 if (Type == ELF::R_MIPS_HI16) in getMatchingLoType()
237 return ELF::R_MIPS_LO16; in getMatchingLoType()
238 if (Type == ELF::R_MICROMIPS_HI16) in getMatchingLoType()
239 return ELF::R_MICROMIPS_LO16; in getMatchingLoType()
240 if (Type == ELF::R_MIPS16_HI16) in getMatchingLoType()
241 return ELF::R_MIPS16_LO16; in getMatchingLoType()
243 if (Reloc.Symbol->getBinding() != ELF::STB_LOCAL) in getMatchingLoType()
244 return ELF::R_MIPS_NONE; in getMatchingLoType()
246 if (Type == ELF::R_MIPS_GOT16) in getMatchingLoType()
247 return ELF::R_MIPS_LO16; in getMatchingLoType()
248 if (Type == ELF::R_MICROMIPS_GOT16) in getMatchingLoType()
249 return ELF::R_MICROMIPS_LO16; in getMatchingLoType()
250 if (Type == ELF::R_MIPS16_GOT16) in getMatchingLoType()
251 return ELF::R_MIPS16_LO16; in getMatchingLoType()
253 return ELF::R_MIPS_NONE; in getMatchingLoType()
261 return getMatchingLoType(Asm, First) != ELF::R_MIPS_NONE && in areMatchingHiAndLo()
356 if (getMatchingLoType(Asm, MipsRelocs[I].R) == ELF::R_MIPS_NONE || in sortRelocs()
395 case ELF::R_MIPS_GOT16: in needsRelocateWithSymbol()
396 case ELF::R_MIPS16_GOT16: in needsRelocateWithSymbol()
397 case ELF::R_MICROMIPS_GOT16: in needsRelocateWithSymbol()
405 case ELF::R_MIPS_HI16: in needsRelocateWithSymbol()
406 case ELF::R_MIPS16_HI16: in needsRelocateWithSymbol()
407 case ELF::R_MICROMIPS_HI16: in needsRelocateWithSymbol()
408 case ELF::R_MIPS_LO16: in needsRelocateWithSymbol()
409 case ELF::R_MIPS16_LO16: in needsRelocateWithSymbol()
410 case ELF::R_MICROMIPS_LO16: in needsRelocateWithSymbol()
413 case ELF::R_MIPS_32: in needsRelocateWithSymbol()
414 if (cast<MCSymbolELF>(Sym).getOther() & ELF::STO_MIPS_MICROMIPS) in needsRelocateWithSymbol()
417 case ELF::R_MIPS_26: in needsRelocateWithSymbol()
418 case ELF::R_MIPS_64: in needsRelocateWithSymbol()
419 case ELF::R_MIPS_GPREL16: in needsRelocateWithSymbol()