Lines Matching refs:ELF
143 if (Type == ELF::R_MIPS_HI16) in getMatchingLoType()
144 return ELF::R_MIPS_LO16; in getMatchingLoType()
145 if (Type == ELF::R_MICROMIPS_HI16) in getMatchingLoType()
146 return ELF::R_MICROMIPS_LO16; in getMatchingLoType()
147 if (Type == ELF::R_MIPS16_HI16) in getMatchingLoType()
148 return ELF::R_MIPS16_LO16; in getMatchingLoType()
151 Reloc.OriginalSymbol->getBinding() != ELF::STB_LOCAL) in getMatchingLoType()
152 return ELF::R_MIPS_NONE; in getMatchingLoType()
154 if (Type == ELF::R_MIPS_GOT16) in getMatchingLoType()
155 return ELF::R_MIPS_LO16; in getMatchingLoType()
156 if (Type == ELF::R_MICROMIPS_GOT16) in getMatchingLoType()
157 return ELF::R_MICROMIPS_LO16; in getMatchingLoType()
158 if (Type == ELF::R_MIPS16_GOT16) in getMatchingLoType()
159 return ELF::R_MIPS16_LO16; in getMatchingLoType()
161 return ELF::R_MIPS_NONE; in getMatchingLoType()
215 : MCELFObjectTargetWriter(Is64, OSABI, ELF::EM_MIPS, HasRelocationAddend) {} in MipsELFObjectWriter()
226 return ELF::R_MIPS_NONE; in getRelocType()
230 return ELF::R_MIPS_NONE; in getRelocType()
233 return IsPCRel ? ELF::R_MIPS_PC16 : ELF::R_MIPS_16; in getRelocType()
236 return IsPCRel ? ELF::R_MIPS_PC32 : ELF::R_MIPS_32; in getRelocType()
244 return ELF::R_MIPS_NONE; in getRelocType()
247 return ELF::R_MIPS_PC16; in getRelocType()
249 return ELF::R_MICROMIPS_PC7_S1; in getRelocType()
251 return ELF::R_MICROMIPS_PC10_S1; in getRelocType()
253 return ELF::R_MICROMIPS_PC16_S1; in getRelocType()
255 return ELF::R_MICROMIPS_PC26_S1; in getRelocType()
257 return ELF::R_MICROMIPS_PC19_S2; in getRelocType()
259 return ELF::R_MICROMIPS_PC18_S3; in getRelocType()
261 return ELF::R_MICROMIPS_PC21_S1; in getRelocType()
263 return ELF::R_MIPS_PC19_S2; in getRelocType()
265 return ELF::R_MIPS_PC18_S3; in getRelocType()
267 return ELF::R_MIPS_PC21_S2; in getRelocType()
269 return ELF::R_MIPS_PC26_S2; in getRelocType()
271 return ELF::R_MIPS_PCHI16; in getRelocType()
273 return ELF::R_MIPS_PCLO16; in getRelocType()
282 return ELF::R_MIPS_64; in getRelocType()
284 return ELF::R_MIPS_TLS_DTPREL32; in getRelocType()
286 return ELF::R_MIPS_TLS_DTPREL64; in getRelocType()
288 return ELF::R_MIPS_TLS_TPREL32; in getRelocType()
290 return ELF::R_MIPS_TLS_TPREL64; in getRelocType()
293 unsigned Type = (unsigned)ELF::R_MIPS_NONE; in getRelocType()
294 Type = setRType((unsigned)ELF::R_MIPS_GPREL32, Type); in getRelocType()
295 Type = setRType2((unsigned)ELF::R_MIPS_64, Type); in getRelocType()
296 Type = setRType3((unsigned)ELF::R_MIPS_NONE, Type); in getRelocType()
299 return ELF::R_MIPS_GPREL32; in getRelocType()
301 return ELF::R_MIPS_GPREL16; in getRelocType()
303 return ELF::R_MIPS_26; in getRelocType()
305 return ELF::R_MIPS_CALL16; in getRelocType()
307 return ELF::R_MIPS_GOT16; in getRelocType()
309 return ELF::R_MIPS_HI16; in getRelocType()
311 return ELF::R_MIPS_LO16; in getRelocType()
313 return ELF::R_MIPS_TLS_GD; in getRelocType()
315 return ELF::R_MIPS_TLS_GOTTPREL; in getRelocType()
317 return ELF::R_MIPS_TLS_TPREL_HI16; in getRelocType()
319 return ELF::R_MIPS_TLS_TPREL_LO16; in getRelocType()
321 return ELF::R_MIPS_TLS_LDM; in getRelocType()
323 return ELF::R_MIPS_TLS_DTPREL_HI16; in getRelocType()
325 return ELF::R_MIPS_TLS_DTPREL_LO16; in getRelocType()
327 return ELF::R_MIPS_GOT_PAGE; in getRelocType()
329 return ELF::R_MIPS_GOT_OFST; in getRelocType()
331 return ELF::R_MIPS_GOT_DISP; in getRelocType()
333 unsigned Type = (unsigned)ELF::R_MIPS_NONE; in getRelocType()
334 Type = setRType((unsigned)ELF::R_MIPS_GPREL16, Type); in getRelocType()
335 Type = setRType2((unsigned)ELF::R_MIPS_SUB, Type); in getRelocType()
336 Type = setRType3((unsigned)ELF::R_MIPS_HI16, Type); in getRelocType()
340 unsigned Type = (unsigned)ELF::R_MIPS_NONE; in getRelocType()
341 Type = setRType((unsigned)ELF::R_MICROMIPS_GPREL16, Type); in getRelocType()
342 Type = setRType2((unsigned)ELF::R_MICROMIPS_SUB, Type); in getRelocType()
343 Type = setRType3((unsigned)ELF::R_MICROMIPS_HI16, Type); in getRelocType()
347 unsigned Type = (unsigned)ELF::R_MIPS_NONE; in getRelocType()
348 Type = setRType((unsigned)ELF::R_MIPS_GPREL16, Type); in getRelocType()
349 Type = setRType2((unsigned)ELF::R_MIPS_SUB, Type); in getRelocType()
350 Type = setRType3((unsigned)ELF::R_MIPS_LO16, Type); in getRelocType()
354 unsigned Type = (unsigned)ELF::R_MIPS_NONE; in getRelocType()
355 Type = setRType((unsigned)ELF::R_MICROMIPS_GPREL16, Type); in getRelocType()
356 Type = setRType2((unsigned)ELF::R_MICROMIPS_SUB, Type); in getRelocType()
357 Type = setRType3((unsigned)ELF::R_MICROMIPS_LO16, Type); in getRelocType()
361 return ELF::R_MIPS_HIGHER; in getRelocType()
363 return ELF::R_MIPS_HIGHEST; in getRelocType()
365 return ELF::R_MIPS_SUB; in getRelocType()
367 return ELF::R_MIPS_GOT_HI16; in getRelocType()
369 return ELF::R_MIPS_GOT_LO16; in getRelocType()
371 return ELF::R_MIPS_CALL_HI16; in getRelocType()
373 return ELF::R_MIPS_CALL_LO16; in getRelocType()
375 return ELF::R_MICROMIPS_26_S1; in getRelocType()
377 return ELF::R_MICROMIPS_HI16; in getRelocType()
379 return ELF::R_MICROMIPS_LO16; in getRelocType()
381 return ELF::R_MICROMIPS_GOT16; in getRelocType()
383 return ELF::R_MICROMIPS_CALL16; in getRelocType()
385 return ELF::R_MICROMIPS_GOT_DISP; in getRelocType()
387 return ELF::R_MICROMIPS_GOT_PAGE; in getRelocType()
389 return ELF::R_MICROMIPS_GOT_OFST; in getRelocType()
391 return ELF::R_MICROMIPS_TLS_GD; in getRelocType()
393 return ELF::R_MICROMIPS_TLS_LDM; in getRelocType()
395 return ELF::R_MICROMIPS_TLS_DTPREL_HI16; in getRelocType()
397 return ELF::R_MICROMIPS_TLS_DTPREL_LO16; in getRelocType()
399 return ELF::R_MICROMIPS_TLS_GOTTPREL; in getRelocType()
401 return ELF::R_MICROMIPS_TLS_TPREL_HI16; in getRelocType()
403 return ELF::R_MICROMIPS_TLS_TPREL_LO16; in getRelocType()
405 return ELF::R_MICROMIPS_SUB; in getRelocType()
407 return ELF::R_MICROMIPS_HIGHER; in getRelocType()
409 return ELF::R_MICROMIPS_HIGHEST; in getRelocType()
411 return ELF::R_MIPS_JALR; in getRelocType()
413 return ELF::R_MICROMIPS_JALR; in getRelocType()
481 return getMatchingLoType(Reloc) != ELF::R_MIPS_NONE; in sortRelocs()
488 assert(MatchingType != ELF::R_MIPS_NONE && in sortRelocs()
547 case ELF::R_MIPS_NONE: in needsRelocateWithSymbol()
557 case ELF::R_MIPS_GOT16: in needsRelocateWithSymbol()
558 case ELF::R_MIPS16_GOT16: in needsRelocateWithSymbol()
559 case ELF::R_MICROMIPS_GOT16: in needsRelocateWithSymbol()
560 case ELF::R_MIPS_HIGHER: in needsRelocateWithSymbol()
561 case ELF::R_MIPS_HIGHEST: in needsRelocateWithSymbol()
562 case ELF::R_MIPS_HI16: in needsRelocateWithSymbol()
563 case ELF::R_MIPS16_HI16: in needsRelocateWithSymbol()
564 case ELF::R_MICROMIPS_HI16: in needsRelocateWithSymbol()
565 case ELF::R_MIPS_LO16: in needsRelocateWithSymbol()
566 case ELF::R_MIPS16_LO16: in needsRelocateWithSymbol()
567 case ELF::R_MICROMIPS_LO16: in needsRelocateWithSymbol()
571 if (cast<MCSymbolELF>(Sym).getOther() & ELF::STO_MIPS_MICROMIPS) in needsRelocateWithSymbol()
575 case ELF::R_MIPS_GOT_PAGE: in needsRelocateWithSymbol()
576 case ELF::R_MICROMIPS_GOT_PAGE: in needsRelocateWithSymbol()
577 case ELF::R_MIPS_GOT_OFST: in needsRelocateWithSymbol()
578 case ELF::R_MICROMIPS_GOT_OFST: in needsRelocateWithSymbol()
579 case ELF::R_MIPS_16: in needsRelocateWithSymbol()
580 case ELF::R_MIPS_32: in needsRelocateWithSymbol()
581 case ELF::R_MIPS_GPREL32: in needsRelocateWithSymbol()
582 if (cast<MCSymbolELF>(Sym).getOther() & ELF::STO_MIPS_MICROMIPS) in needsRelocateWithSymbol()
585 case ELF::R_MIPS_26: in needsRelocateWithSymbol()
586 case ELF::R_MIPS_64: in needsRelocateWithSymbol()
587 case ELF::R_MIPS_GPREL16: in needsRelocateWithSymbol()
588 case ELF::R_MIPS_PC16: in needsRelocateWithSymbol()
589 case ELF::R_MIPS_SUB: in needsRelocateWithSymbol()
594 case ELF::R_MIPS_REL32: in needsRelocateWithSymbol()
595 case ELF::R_MIPS_LITERAL: in needsRelocateWithSymbol()
596 case ELF::R_MIPS_CALL16: in needsRelocateWithSymbol()
597 case ELF::R_MIPS_SHIFT5: in needsRelocateWithSymbol()
598 case ELF::R_MIPS_SHIFT6: in needsRelocateWithSymbol()
599 case ELF::R_MIPS_GOT_DISP: in needsRelocateWithSymbol()
600 case ELF::R_MIPS_GOT_HI16: in needsRelocateWithSymbol()
601 case ELF::R_MIPS_GOT_LO16: in needsRelocateWithSymbol()
602 case ELF::R_MIPS_INSERT_A: in needsRelocateWithSymbol()
603 case ELF::R_MIPS_INSERT_B: in needsRelocateWithSymbol()
604 case ELF::R_MIPS_DELETE: in needsRelocateWithSymbol()
605 case ELF::R_MIPS_CALL_HI16: in needsRelocateWithSymbol()
606 case ELF::R_MIPS_CALL_LO16: in needsRelocateWithSymbol()
607 case ELF::R_MIPS_SCN_DISP: in needsRelocateWithSymbol()
608 case ELF::R_MIPS_REL16: in needsRelocateWithSymbol()
609 case ELF::R_MIPS_ADD_IMMEDIATE: in needsRelocateWithSymbol()
610 case ELF::R_MIPS_PJUMP: in needsRelocateWithSymbol()
611 case ELF::R_MIPS_RELGOT: in needsRelocateWithSymbol()
612 case ELF::R_MIPS_JALR: in needsRelocateWithSymbol()
613 case ELF::R_MIPS_TLS_DTPMOD32: in needsRelocateWithSymbol()
614 case ELF::R_MIPS_TLS_DTPREL32: in needsRelocateWithSymbol()
615 case ELF::R_MIPS_TLS_DTPMOD64: in needsRelocateWithSymbol()
616 case ELF::R_MIPS_TLS_DTPREL64: in needsRelocateWithSymbol()
617 case ELF::R_MIPS_TLS_GD: in needsRelocateWithSymbol()
618 case ELF::R_MIPS_TLS_LDM: in needsRelocateWithSymbol()
619 case ELF::R_MIPS_TLS_DTPREL_HI16: in needsRelocateWithSymbol()
620 case ELF::R_MIPS_TLS_DTPREL_LO16: in needsRelocateWithSymbol()
621 case ELF::R_MIPS_TLS_GOTTPREL: in needsRelocateWithSymbol()
622 case ELF::R_MIPS_TLS_TPREL32: in needsRelocateWithSymbol()
623 case ELF::R_MIPS_TLS_TPREL64: in needsRelocateWithSymbol()
624 case ELF::R_MIPS_TLS_TPREL_HI16: in needsRelocateWithSymbol()
625 case ELF::R_MIPS_TLS_TPREL_LO16: in needsRelocateWithSymbol()
626 case ELF::R_MIPS_GLOB_DAT: in needsRelocateWithSymbol()
627 case ELF::R_MIPS_PC21_S2: in needsRelocateWithSymbol()
628 case ELF::R_MIPS_PC26_S2: in needsRelocateWithSymbol()
629 case ELF::R_MIPS_PC18_S3: in needsRelocateWithSymbol()
630 case ELF::R_MIPS_PC19_S2: in needsRelocateWithSymbol()
631 case ELF::R_MIPS_PCHI16: in needsRelocateWithSymbol()
632 case ELF::R_MIPS_PCLO16: in needsRelocateWithSymbol()
633 case ELF::R_MIPS_COPY: in needsRelocateWithSymbol()
634 case ELF::R_MIPS_JUMP_SLOT: in needsRelocateWithSymbol()
635 case ELF::R_MIPS_NUM: in needsRelocateWithSymbol()
636 case ELF::R_MIPS_PC32: in needsRelocateWithSymbol()
637 case ELF::R_MIPS_EH: in needsRelocateWithSymbol()
638 case ELF::R_MICROMIPS_26_S1: in needsRelocateWithSymbol()
639 case ELF::R_MICROMIPS_GPREL16: in needsRelocateWithSymbol()
640 case ELF::R_MICROMIPS_LITERAL: in needsRelocateWithSymbol()
641 case ELF::R_MICROMIPS_PC7_S1: in needsRelocateWithSymbol()
642 case ELF::R_MICROMIPS_PC10_S1: in needsRelocateWithSymbol()
643 case ELF::R_MICROMIPS_PC16_S1: in needsRelocateWithSymbol()
644 case ELF::R_MICROMIPS_CALL16: in needsRelocateWithSymbol()
645 case ELF::R_MICROMIPS_GOT_DISP: in needsRelocateWithSymbol()
646 case ELF::R_MICROMIPS_GOT_HI16: in needsRelocateWithSymbol()
647 case ELF::R_MICROMIPS_GOT_LO16: in needsRelocateWithSymbol()
648 case ELF::R_MICROMIPS_SUB: in needsRelocateWithSymbol()
649 case ELF::R_MICROMIPS_HIGHER: in needsRelocateWithSymbol()
650 case ELF::R_MICROMIPS_HIGHEST: in needsRelocateWithSymbol()
651 case ELF::R_MICROMIPS_CALL_HI16: in needsRelocateWithSymbol()
652 case ELF::R_MICROMIPS_CALL_LO16: in needsRelocateWithSymbol()
653 case ELF::R_MICROMIPS_SCN_DISP: in needsRelocateWithSymbol()
654 case ELF::R_MICROMIPS_JALR: in needsRelocateWithSymbol()
655 case ELF::R_MICROMIPS_HI0_LO16: in needsRelocateWithSymbol()
656 case ELF::R_MICROMIPS_TLS_GD: in needsRelocateWithSymbol()
657 case ELF::R_MICROMIPS_TLS_LDM: in needsRelocateWithSymbol()
658 case ELF::R_MICROMIPS_TLS_DTPREL_HI16: in needsRelocateWithSymbol()
659 case ELF::R_MICROMIPS_TLS_DTPREL_LO16: in needsRelocateWithSymbol()
660 case ELF::R_MICROMIPS_TLS_GOTTPREL: in needsRelocateWithSymbol()
661 case ELF::R_MICROMIPS_TLS_TPREL_HI16: in needsRelocateWithSymbol()
662 case ELF::R_MICROMIPS_TLS_TPREL_LO16: in needsRelocateWithSymbol()
663 case ELF::R_MICROMIPS_GPREL7_S2: in needsRelocateWithSymbol()
664 case ELF::R_MICROMIPS_PC23_S2: in needsRelocateWithSymbol()
665 case ELF::R_MICROMIPS_PC21_S1: in needsRelocateWithSymbol()
666 case ELF::R_MICROMIPS_PC26_S1: in needsRelocateWithSymbol()
667 case ELF::R_MICROMIPS_PC18_S3: in needsRelocateWithSymbol()
668 case ELF::R_MICROMIPS_PC19_S2: in needsRelocateWithSymbol()
673 case ELF::R_MIPS16_26: in needsRelocateWithSymbol()
674 case ELF::R_MIPS16_GPREL: in needsRelocateWithSymbol()
675 case ELF::R_MIPS16_CALL16: in needsRelocateWithSymbol()
676 case ELF::R_MIPS16_TLS_GD: in needsRelocateWithSymbol()
677 case ELF::R_MIPS16_TLS_LDM: in needsRelocateWithSymbol()
678 case ELF::R_MIPS16_TLS_DTPREL_HI16: in needsRelocateWithSymbol()
679 case ELF::R_MIPS16_TLS_DTPREL_LO16: in needsRelocateWithSymbol()
680 case ELF::R_MIPS16_TLS_GOTTPREL: in needsRelocateWithSymbol()
681 case ELF::R_MIPS16_TLS_TPREL_HI16: in needsRelocateWithSymbol()
682 case ELF::R_MIPS16_TLS_TPREL_LO16: in needsRelocateWithSymbol()