Lines Matching full:elf
1 //===-- MipsELFObjectWriter.cpp - Mips ELF Writer -------------------------===//
58 : MCELFObjectTargetWriter(_is64Bit, OSABI, ELF::EM_MIPS, in MipsELFObjectWriter()
68 unsigned Type = (unsigned)ELF::R_MIPS_NONE; in GetRelocType()
76 Type = ELF::R_MIPS_32; in GetRelocType()
80 Type = ELF::R_MIPS_64; in GetRelocType()
84 Type = setRType((unsigned)ELF::R_MIPS_GPREL32, Type); in GetRelocType()
85 Type = setRType2((unsigned)ELF::R_MIPS_64, Type); in GetRelocType()
86 Type = setRType3((unsigned)ELF::R_MIPS_NONE, Type); in GetRelocType()
89 Type = ELF::R_MIPS_GPREL32; in GetRelocType()
92 Type = ELF::R_MIPS_GPREL16; in GetRelocType()
95 Type = ELF::R_MIPS_26; in GetRelocType()
98 Type = ELF::R_MIPS_CALL16; in GetRelocType()
102 Type = ELF::R_MIPS_GOT16; in GetRelocType()
105 Type = ELF::R_MIPS_HI16; in GetRelocType()
108 Type = ELF::R_MIPS_LO16; in GetRelocType()
111 Type = ELF::R_MIPS_TLS_GD; in GetRelocType()
114 Type = ELF::R_MIPS_TLS_GOTTPREL; in GetRelocType()
117 Type = ELF::R_MIPS_TLS_TPREL_HI16; in GetRelocType()
120 Type = ELF::R_MIPS_TLS_TPREL_LO16; in GetRelocType()
123 Type = ELF::R_MIPS_TLS_LDM; in GetRelocType()
126 Type = ELF::R_MIPS_TLS_DTPREL_HI16; in GetRelocType()
129 Type = ELF::R_MIPS_TLS_DTPREL_LO16; in GetRelocType()
133 Type = ELF::R_MIPS_PC16; in GetRelocType()
136 Type = ELF::R_MIPS_GOT_PAGE; in GetRelocType()
139 Type = ELF::R_MIPS_GOT_OFST; in GetRelocType()
142 Type = ELF::R_MIPS_GOT_DISP; in GetRelocType()
145 Type = setRType((unsigned)ELF::R_MIPS_GPREL16, Type); in GetRelocType()
146 Type = setRType2((unsigned)ELF::R_MIPS_SUB, Type); in GetRelocType()
147 Type = setRType3((unsigned)ELF::R_MIPS_HI16, Type); in GetRelocType()
150 Type = setRType((unsigned)ELF::R_MIPS_GPREL16, Type); in GetRelocType()
151 Type = setRType2((unsigned)ELF::R_MIPS_SUB, Type); in GetRelocType()
152 Type = setRType3((unsigned)ELF::R_MIPS_LO16, Type); in GetRelocType()
155 Type = ELF::R_MIPS_HIGHER; in GetRelocType()
158 Type = ELF::R_MIPS_HIGHEST; in GetRelocType()
161 Type = ELF::R_MIPS_GOT_HI16; in GetRelocType()
164 Type = ELF::R_MIPS_GOT_LO16; in GetRelocType()
167 Type = ELF::R_MIPS_CALL_HI16; in GetRelocType()
170 Type = ELF::R_MIPS_CALL_LO16; in GetRelocType()
173 Type = ELF::R_MICROMIPS_26_S1; in GetRelocType()
176 Type = ELF::R_MICROMIPS_HI16; in GetRelocType()
179 Type = ELF::R_MICROMIPS_LO16; in GetRelocType()
182 Type = ELF::R_MICROMIPS_GOT16; in GetRelocType()
185 Type = ELF::R_MICROMIPS_PC7_S1; in GetRelocType()
188 Type = ELF::R_MICROMIPS_PC10_S1; in GetRelocType()
191 Type = ELF::R_MICROMIPS_PC16_S1; in GetRelocType()
194 Type = ELF::R_MICROMIPS_CALL16; in GetRelocType()
197 Type = ELF::R_MICROMIPS_GOT_DISP; in GetRelocType()
200 Type = ELF::R_MICROMIPS_GOT_PAGE; in GetRelocType()
203 Type = ELF::R_MICROMIPS_GOT_OFST; in GetRelocType()
206 Type = ELF::R_MICROMIPS_TLS_GD; in GetRelocType()
209 Type = ELF::R_MICROMIPS_TLS_LDM; in GetRelocType()
212 Type = ELF::R_MICROMIPS_TLS_DTPREL_HI16; in GetRelocType()
215 Type = ELF::R_MICROMIPS_TLS_DTPREL_LO16; in GetRelocType()
218 Type = ELF::R_MICROMIPS_TLS_TPREL_HI16; in GetRelocType()
221 Type = ELF::R_MICROMIPS_TLS_TPREL_LO16; in GetRelocType()
224 Type = ELF::R_MIPS_PC19_S2; in GetRelocType()
227 Type = ELF::R_MIPS_PC18_S3; in GetRelocType()
230 Type = ELF::R_MIPS_PC21_S2; in GetRelocType()
233 Type = ELF::R_MIPS_PC26_S2; in GetRelocType()
236 Type = ELF::R_MIPS_PCHI16; in GetRelocType()
239 Type = ELF::R_MIPS_PCLO16; in GetRelocType()
267 if (Type == ELF::R_MIPS_HI16) in getMatchingLoType()
268 return ELF::R_MIPS_LO16; in getMatchingLoType()
269 if (Type == ELF::R_MICROMIPS_HI16) in getMatchingLoType()
270 return ELF::R_MICROMIPS_LO16; in getMatchingLoType()
271 if (Type == ELF::R_MIPS16_HI16) in getMatchingLoType()
272 return ELF::R_MIPS16_LO16; in getMatchingLoType()
276 if (MCELF::GetBinding(SD) != ELF::STB_LOCAL) in getMatchingLoType()
277 return ELF::R_MIPS_NONE; in getMatchingLoType()
279 if (Type == ELF::R_MIPS_GOT16) in getMatchingLoType()
280 return ELF::R_MIPS_LO16; in getMatchingLoType()
281 if (Type == ELF::R_MICROMIPS_GOT16) in getMatchingLoType()
282 return ELF::R_MICROMIPS_LO16; in getMatchingLoType()
283 if (Type == ELF::R_MIPS16_GOT16) in getMatchingLoType()
284 return ELF::R_MIPS16_LO16; in getMatchingLoType()
286 return ELF::R_MIPS_NONE; in getMatchingLoType()
294 return getMatchingLoType(Asm, First) != ELF::R_MIPS_NONE && in areMatchingHiAndLo()
378 if (getMatchingLoType(Asm, MipsRelocs[I].R) == ELF::R_MIPS_NONE || in sortRelocs()
418 case ELF::R_MIPS_GOT16: in needsRelocateWithSymbol()
419 case ELF::R_MIPS16_GOT16: in needsRelocateWithSymbol()
420 case ELF::R_MICROMIPS_GOT16: in needsRelocateWithSymbol()
428 case ELF::R_MIPS_HI16: in needsRelocateWithSymbol()
429 case ELF::R_MIPS16_HI16: in needsRelocateWithSymbol()
430 case ELF::R_MICROMIPS_HI16: in needsRelocateWithSymbol()
431 case ELF::R_MIPS_LO16: in needsRelocateWithSymbol()
432 case ELF::R_MIPS16_LO16: in needsRelocateWithSymbol()
433 case ELF::R_MICROMIPS_LO16: in needsRelocateWithSymbol()
436 case ELF::R_MIPS_32: in needsRelocateWithSymbol()
437 if (MCELF::getOther(SD) & (ELF::STO_MIPS_MICROMIPS >> 2)) in needsRelocateWithSymbol()
440 case ELF::R_MIPS_26: in needsRelocateWithSymbol()
441 case ELF::R_MIPS_64: in needsRelocateWithSymbol()
442 case ELF::R_MIPS_GPREL16: in needsRelocateWithSymbol()