Lines Matching full:elf
18 #include "llvm/Object/ELF.h"
36 case ELF::R_X86_64_8:
37 case ELF::R_X86_64_16:
38 case ELF::R_X86_64_32:
39 case ELF::R_X86_64_32S:
40 case ELF::R_X86_64_64:
41 case ELF::R_X86_64_PC8:
42 case ELF::R_X86_64_PC32:
43 case ELF::R_X86_64_PC64:
44 case ELF::R_X86_64_PLT32:
45 case ELF::R_X86_64_GOTPC64:
46 case ELF::R_X86_64_GOTPCREL:
47 case ELF::R_X86_64_GOTTPOFF:
48 case ELF::R_X86_64_TPOFF32:
49 case ELF::R_X86_64_GOTPCRELX:
50 case ELF::R_X86_64_REX_GOTPCRELX:
59 case ELF::R_AARCH64_CALL26:
60 case ELF::R_AARCH64_JUMP26:
61 case ELF::R_AARCH64_TSTBR14:
62 case ELF::R_AARCH64_CONDBR19:
63 case ELF::R_AARCH64_ADR_PREL_LO21:
64 case ELF::R_AARCH64_ADR_PREL_PG_HI21:
65 case ELF::R_AARCH64_ADR_PREL_PG_HI21_NC:
66 case ELF::R_AARCH64_LDST64_ABS_LO12_NC:
67 case ELF::R_AARCH64_ADD_ABS_LO12_NC:
68 case ELF::R_AARCH64_LDST128_ABS_LO12_NC:
69 case ELF::R_AARCH64_LDST32_ABS_LO12_NC:
70 case ELF::R_AARCH64_LDST16_ABS_LO12_NC:
71 case ELF::R_AARCH64_LDST8_ABS_LO12_NC:
72 case ELF::R_AARCH64_ADR_GOT_PAGE:
73 case ELF::R_AARCH64_TLSDESC_ADR_PREL21:
74 case ELF::R_AARCH64_TLSDESC_ADR_PAGE21:
75 case ELF::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
76 case ELF::R_AARCH64_TLSLE_ADD_TPREL_HI12:
77 case ELF::R_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
78 case ELF::R_AARCH64_TLSLE_MOVW_TPREL_G0:
79 case ELF::R_AARCH64_TLSLE_MOVW_TPREL_G0_NC:
80 case ELF::R_AARCH64_LD64_GOT_LO12_NC:
81 case ELF::R_AARCH64_TLSDESC_LD64_LO12:
82 case ELF::R_AARCH64_TLSDESC_ADD_LO12:
83 case ELF::R_AARCH64_TLSDESC_CALL:
84 case ELF::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
85 case ELF::R_AARCH64_PREL16:
86 case ELF::R_AARCH64_PREL32:
87 case ELF::R_AARCH64_PREL64:
88 case ELF::R_AARCH64_ABS16:
89 case ELF::R_AARCH64_ABS32:
90 case ELF::R_AARCH64_ABS64:
91 case ELF::R_AARCH64_MOVW_UABS_G0:
92 case ELF::R_AARCH64_MOVW_UABS_G0_NC:
93 case ELF::R_AARCH64_MOVW_UABS_G1:
94 case ELF::R_AARCH64_MOVW_UABS_G1_NC:
95 case ELF::R_AARCH64_MOVW_UABS_G2:
96 case ELF::R_AARCH64_MOVW_UABS_G2_NC:
97 case ELF::R_AARCH64_MOVW_UABS_G3:
106 case ELF::R_RISCV_JAL:
107 case ELF::R_RISCV_CALL:
108 case ELF::R_RISCV_CALL_PLT:
109 case ELF::R_RISCV_BRANCH:
110 case ELF::R_RISCV_RELAX:
111 case ELF::R_RISCV_GOT_HI20:
112 case ELF::R_RISCV_PCREL_HI20:
113 case ELF::R_RISCV_PCREL_LO12_I:
114 case ELF::R_RISCV_PCREL_LO12_S:
115 case ELF::R_RISCV_RVC_JUMP:
116 case ELF::R_RISCV_RVC_BRANCH:
117 case ELF::R_RISCV_ADD32:
118 case ELF::R_RISCV_SUB32:
119 case ELF::R_RISCV_HI20:
120 case ELF::R_RISCV_LO12_I:
121 case ELF::R_RISCV_LO12_S:
122 case ELF::R_RISCV_64:
123 case ELF::R_RISCV_TLS_GOT_HI20:
124 case ELF::R_RISCV_TPREL_HI20:
125 case ELF::R_RISCV_TPREL_ADD:
126 case ELF::R_RISCV_TPREL_LO12_I:
127 case ELF::R_RISCV_TPREL_LO12_S:
137 errs() << object::getELFRelocationTypeName(ELF::EM_X86_64, Type) << '\n';
139 case ELF::R_X86_64_8:
140 case ELF::R_X86_64_PC8:
142 case ELF::R_X86_64_16:
144 case ELF::R_X86_64_PLT32:
145 case ELF::R_X86_64_PC32:
146 case ELF::R_X86_64_32S:
147 case ELF::R_X86_64_32:
148 case ELF::R_X86_64_GOTPCREL:
149 case ELF::R_X86_64_GOTTPOFF:
150 case ELF::R_X86_64_TPOFF32:
151 case ELF::R_X86_64_GOTPCRELX:
152 case ELF::R_X86_64_REX_GOTPCRELX:
154 case ELF::R_X86_64_PC64:
155 case ELF::R_X86_64_64:
156 case ELF::R_X86_64_GOTPC64:
164 errs() << object::getELFRelocationTypeName(ELF::EM_AARCH64, Type) << '\n';
166 case ELF::R_AARCH64_ABS16:
167 case ELF::R_AARCH64_PREL16:
169 case ELF::R_AARCH64_CALL26:
170 case ELF::R_AARCH64_JUMP26:
171 case ELF::R_AARCH64_TSTBR14:
172 case ELF::R_AARCH64_CONDBR19:
173 case ELF::R_AARCH64_ADR_PREL_LO21:
174 case ELF::R_AARCH64_ADR_PREL_PG_HI21:
175 case ELF::R_AARCH64_ADR_PREL_PG_HI21_NC:
176 case ELF::R_AARCH64_LDST64_ABS_LO12_NC:
177 case ELF::R_AARCH64_ADD_ABS_LO12_NC:
178 case ELF::R_AARCH64_LDST128_ABS_LO12_NC:
179 case ELF::R_AARCH64_LDST32_ABS_LO12_NC:
180 case ELF::R_AARCH64_LDST16_ABS_LO12_NC:
181 case ELF::R_AARCH64_LDST8_ABS_LO12_NC:
182 case ELF::R_AARCH64_ADR_GOT_PAGE:
183 case ELF::R_AARCH64_TLSDESC_ADR_PREL21:
184 case ELF::R_AARCH64_TLSDESC_ADR_PAGE21:
185 case ELF::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
186 case ELF::R_AARCH64_TLSLE_ADD_TPREL_HI12:
187 case ELF::R_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
188 case ELF::R_AARCH64_TLSLE_MOVW_TPREL_G0:
189 case ELF::R_AARCH64_TLSLE_MOVW_TPREL_G0_NC:
190 case ELF::R_AARCH64_LD64_GOT_LO12_NC:
191 case ELF::R_AARCH64_TLSDESC_LD64_LO12:
192 case ELF::R_AARCH64_TLSDESC_ADD_LO12:
193 case ELF::R_AARCH64_TLSDESC_CALL:
194 case ELF::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
195 case ELF::R_AARCH64_PREL32:
196 case ELF::R_AARCH64_MOVW_UABS_G0:
197 case ELF::R_AARCH64_MOVW_UABS_G0_NC:
198 case ELF::R_AARCH64_MOVW_UABS_G1:
199 case ELF::R_AARCH64_MOVW_UABS_G1_NC:
200 case ELF::R_AARCH64_MOVW_UABS_G2:
201 case ELF::R_AARCH64_MOVW_UABS_G2_NC:
202 case ELF::R_AARCH64_MOVW_UABS_G3:
203 case ELF::R_AARCH64_ABS32:
205 case ELF::R_AARCH64_ABS64:
206 case ELF::R_AARCH64_PREL64:
214 errs() << object::getELFRelocationTypeName(ELF::EM_RISCV, Type) << '\n';
216 case ELF::R_RISCV_RVC_JUMP:
217 case ELF::R_RISCV_RVC_BRANCH:
219 case ELF::R_RISCV_JAL:
220 case ELF::R_RISCV_BRANCH:
221 case ELF::R_RISCV_PCREL_HI20:
222 case ELF::R_RISCV_PCREL_LO12_I:
223 case ELF::R_RISCV_PCREL_LO12_S:
224 case ELF::R_RISCV_32_PCREL:
225 case ELF::R_RISCV_CALL:
226 case ELF::R_RISCV_CALL_PLT:
227 case ELF::R_RISCV_ADD32:
228 case ELF::R_RISCV_SUB32:
229 case ELF::R_RISCV_HI20:
230 case ELF::R_RISCV_LO12_I:
231 case ELF::R_RISCV_LO12_S:
233 case ELF::R_RISCV_64:
234 case ELF::R_RISCV_GOT_HI20:
235 case ELF::R_RISCV_TLS_GOT_HI20:
242 return Type == ELF::R_X86_64_NONE;
246 return Type == ELF::R_AARCH64_NONE || Type == ELF::R_AARCH64_LD_PREL_LO19;
253 case ELF::R_RISCV_NONE:
254 case ELF::R_RISCV_RELAX:
293 if (Type == ELF::R_AARCH64_LD64_GOT_LO12_NC && IsAddImm(Contents)) {
294 Type = ELF::R_AARCH64_ADD_ABS_LO12_NC;
308 case ELF::R_AARCH64_TLSDESC_LD64_LO12:
309 case ELF::R_AARCH64_TLSDESC_ADR_PAGE21:
310 case ELF::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
311 case ELF::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: {
327 case ELF::R_AARCH64_LD64_GOT_LO12_NC:
328 case ELF::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
329 case ELF::R_AARCH64_TLSDESC_LD64_LO12: {
339 case ELF::R_AARCH64_ADR_PREL_PG_HI21:
340 case ELF::R_AARCH64_ADD_ABS_LO12_NC:
341 case ELF::R_AARCH64_ADR_GOT_PAGE:
342 case ELF::R_AARCH64_LD64_GOT_LO12_NC:
358 case ELF::R_X86_64_64:
359 case ELF::R_X86_64_32:
361 case ELF::R_X86_64_PC32:
372 case ELF::R_AARCH64_ABS16:
373 case ELF::R_AARCH64_ABS32:
374 case ELF::R_AARCH64_ABS64:
376 case ELF::R_AARCH64_PREL16:
377 case ELF::R_AARCH64_PREL32:
378 case ELF::R_AARCH64_PREL64:
381 case ELF::R_AARCH64_CALL26:
388 case ELF::R_AARCH64_JUMP26:
404 case ELF::R_RISCV_64:
411 if (Type == ELF::R_X86_64_32S)
422 errs() << object::getELFRelocationTypeName(ELF::EM_AARCH64, Type) << '\n';
424 case ELF::R_AARCH64_ABS16:
425 case ELF::R_AARCH64_ABS32:
426 case ELF::R_AARCH64_ABS64:
428 case ELF::R_AARCH64_PREL16:
430 case ELF::R_AARCH64_PREL32:
432 case ELF::R_AARCH64_PREL64:
434 case ELF::R_AARCH64_TLSDESC_CALL:
435 case ELF::R_AARCH64_JUMP26:
436 case ELF::R_AARCH64_CALL26:
440 case ELF::R_AARCH64_TSTBR14:
444 case ELF::R_AARCH64_CONDBR19:
448 case ELF::R_AARCH64_ADR_GOT_PAGE:
449 case ELF::R_AARCH64_TLSDESC_ADR_PREL21:
450 case ELF::R_AARCH64_TLSDESC_ADR_PAGE21:
451 case ELF::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
452 case ELF::R_AARCH64_ADR_PREL_LO21:
453 case ELF::R_AARCH64_ADR_PREL_PG_HI21:
454 case ELF::R_AARCH64_ADR_PREL_PG_HI21_NC: {
470 case ELF::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
471 case ELF::R_AARCH64_TLSDESC_LD64_LO12:
472 case ELF::R_AARCH64_LD64_GOT_LO12_NC:
473 case ELF::R_AARCH64_LDST64_ABS_LO12_NC: {
479 case ELF::R_AARCH64_TLSLE_ADD_TPREL_HI12:
480 case ELF::R_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
481 case ELF::R_AARCH64_TLSDESC_ADD_LO12:
482 case ELF::R_AARCH64_ADD_ABS_LO12_NC: {
487 case ELF::R_AARCH64_LDST128_ABS_LO12_NC: {
493 case ELF::R_AARCH64_LDST32_ABS_LO12_NC: {
499 case ELF::R_AARCH64_LDST16_ABS_LO12_NC: {
505 case ELF::R_AARCH64_LDST8_ABS_LO12_NC: {
511 case ELF::R_AARCH64_MOVW_UABS_G3:
512 case ELF::R_AARCH64_MOVW_UABS_G2_NC:
513 case ELF::R_AARCH64_MOVW_UABS_G2:
514 case ELF::R_AARCH64_MOVW_UABS_G1_NC:
515 case ELF::R_AARCH64_MOVW_UABS_G1:
516 case ELF::R_AARCH64_MOVW_UABS_G0_NC:
517 case ELF::R_AARCH64_MOVW_UABS_G0:
554 errs() << object::getELFRelocationTypeName(ELF::EM_RISCV, Type) << '\n';
556 case ELF::R_RISCV_JAL:
558 case ELF::R_RISCV_CALL:
559 case ELF::R_RISCV_CALL_PLT:
561 case ELF::R_RISCV_BRANCH:
563 case ELF::R_RISCV_GOT_HI20:
564 case ELF::R_RISCV_TLS_GOT_HI20:
571 case ELF::R_RISCV_PCREL_HI20:
572 case ELF::R_RISCV_HI20:
574 case ELF::R_RISCV_PCREL_LO12_I:
575 case ELF::R_RISCV_LO12_I:
577 case ELF::R_RISCV_PCREL_LO12_S:
578 case ELF::R_RISCV_LO12_S:
580 case ELF::R_RISCV_RVC_JUMP:
582 case ELF::R_RISCV_RVC_BRANCH:
584 case ELF::R_RISCV_ADD32:
585 case ELF::R_RISCV_SUB32:
586 case ELF::R_RISCV_64:
595 case ELF::R_X86_64_GOT32:
596 case ELF::R_X86_64_GOTPCREL:
597 case ELF::R_X86_64_GOTTPOFF:
598 case ELF::R_X86_64_GOTOFF64:
599 case ELF::R_X86_64_GOTPC32:
600 case ELF::R_X86_64_GOT64:
601 case ELF::R_X86_64_GOTPCREL64:
602 case ELF::R_X86_64_GOTPC64:
603 case ELF::R_X86_64_GOTPLT64:
604 case ELF::R_X86_64_GOTPC32_TLSDESC:
605 case ELF::R_X86_64_GOTPCRELX:
606 case ELF::R_X86_64_REX_GOTPCRELX:
615 case ELF::R_AARCH64_ADR_GOT_PAGE:
616 case ELF::R_AARCH64_LD64_GOT_LO12_NC:
617 case ELF::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
618 case ELF::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
619 case ELF::R_AARCH64_TLSDESC_ADR_PREL21:
620 case ELF::R_AARCH64_TLSDESC_ADR_PAGE21:
621 case ELF::R_AARCH64_TLSDESC_LD64_LO12:
622 case ELF::R_AARCH64_TLSDESC_ADD_LO12:
623 case ELF::R_AARCH64_TLSDESC_CALL:
632 case ELF::R_RISCV_GOT_HI20:
633 case ELF::R_RISCV_TLS_GOT_HI20:
642 case ELF::R_X86_64_TPOFF32:
643 case ELF::R_X86_64_TPOFF64:
644 case ELF::R_X86_64_GOTTPOFF:
653 case ELF::R_AARCH64_TLSDESC_ADR_PREL21:
654 case ELF::R_AARCH64_TLSDESC_ADR_PAGE21:
655 case ELF::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
656 case ELF::R_AARCH64_TLSLE_ADD_TPREL_HI12:
657 case ELF::R_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
658 case ELF::R_AARCH64_TLSLE_MOVW_TPREL_G0:
659 case ELF::R_AARCH64_TLSLE_MOVW_TPREL_G0_NC:
660 case ELF::R_AARCH64_TLSDESC_LD64_LO12:
661 case ELF::R_AARCH64_TLSDESC_ADD_LO12:
662 case ELF::R_AARCH64_TLSDESC_CALL:
663 case ELF::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
672 case ELF::R_RISCV_TLS_GOT_HI20:
673 case ELF::R_RISCV_TPREL_HI20:
674 case ELF::R_RISCV_TPREL_ADD:
675 case ELF::R_RISCV_TPREL_LO12_I:
676 case ELF::R_RISCV_TPREL_LO12_S:
687 case ELF::R_X86_64_64:
688 case ELF::R_X86_64_32:
689 case ELF::R_X86_64_32S:
690 case ELF::R_X86_64_16:
691 case ELF::R_X86_64_8:
692 case ELF::R_X86_64_TPOFF32:
694 case ELF::R_X86_64_PC8:
695 case ELF::R_X86_64_PC32:
696 case ELF::R_X86_64_PC64:
697 case ELF::R_X86_64_GOTPCREL:
698 case ELF::R_X86_64_PLT32:
699 case ELF::R_X86_64_GOTOFF64:
700 case ELF::R_X86_64_GOTPC32:
701 case ELF::R_X86_64_GOTPC64:
702 case ELF::R_X86_64_GOTTPOFF:
703 case ELF::R_X86_64_GOTPCRELX:
704 case ELF::R_X86_64_REX_GOTPCRELX:
713 case ELF::R_AARCH64_ABS16:
714 case ELF::R_AARCH64_ABS32:
715 case ELF::R_AARCH64_ABS64:
716 case ELF::R_AARCH64_LDST64_ABS_LO12_NC:
717 case ELF::R_AARCH64_ADD_ABS_LO12_NC:
718 case ELF::R_AARCH64_LDST128_ABS_LO12_NC:
719 case ELF::R_AARCH64_LDST32_ABS_LO12_NC:
720 case ELF::R_AARCH64_LDST16_ABS_LO12_NC:
721 case ELF::R_AARCH64_LDST8_ABS_LO12_NC:
722 case ELF::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
723 case ELF::R_AARCH64_TLSLE_ADD_TPREL_HI12:
724 case ELF::R_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
725 case ELF::R_AARCH64_TLSLE_MOVW_TPREL_G0:
726 case ELF::R_AARCH64_TLSLE_MOVW_TPREL_G0_NC:
727 case ELF::R_AARCH64_LD64_GOT_LO12_NC:
728 case ELF::R_AARCH64_TLSDESC_LD64_LO12:
729 case ELF::R_AARCH64_TLSDESC_ADD_LO12:
730 case ELF::R_AARCH64_MOVW_UABS_G0:
731 case ELF::R_AARCH64_MOVW_UABS_G0_NC:
732 case ELF::R_AARCH64_MOVW_UABS_G1:
733 case ELF::R_AARCH64_MOVW_UABS_G1_NC:
734 case ELF::R_AARCH64_MOVW_UABS_G2:
735 case ELF::R_AARCH64_MOVW_UABS_G2_NC:
736 case ELF::R_AARCH64_MOVW_UABS_G3:
738 case ELF::R_AARCH64_TLSDESC_CALL:
739 case ELF::R_AARCH64_CALL26:
740 case ELF::R_AARCH64_JUMP26:
741 case ELF::R_AARCH64_TSTBR14:
742 case ELF::R_AARCH64_CONDBR19:
743 case ELF::R_AARCH64_ADR_PREL_LO21:
744 case ELF::R_AARCH64_ADR_PREL_PG_HI21:
745 case ELF::R_AARCH64_ADR_PREL_PG_HI21_NC:
746 case ELF::R_AARCH64_ADR_GOT_PAGE:
747 case ELF::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
748 case ELF::R_AARCH64_TLSDESC_ADR_PREL21:
749 case ELF::R_AARCH64_TLSDESC_ADR_PAGE21:
750 case ELF::R_AARCH64_PREL16:
751 case ELF::R_AARCH64_PREL32:
752 case ELF::R_AARCH64_PREL64:
761 case ELF::R_RISCV_ADD32:
762 case ELF::R_RISCV_SUB32:
763 case ELF::R_RISCV_HI20:
764 case ELF::R_RISCV_LO12_I:
765 case ELF::R_RISCV_LO12_S:
766 case ELF::R_RISCV_64:
768 case ELF::R_RISCV_JAL:
769 case ELF::R_RISCV_CALL:
770 case ELF::R_RISCV_CALL_PLT:
771 case ELF::R_RISCV_BRANCH:
772 case ELF::R_RISCV_GOT_HI20:
773 case ELF::R_RISCV_PCREL_HI20:
774 case ELF::R_RISCV_PCREL_LO12_I:
775 case ELF::R_RISCV_PCREL_LO12_S:
776 case ELF::R_RISCV_RVC_JUMP:
777 case ELF::R_RISCV_RVC_BRANCH:
778 case ELF::R_RISCV_32_PCREL:
779 case ELF::R_RISCV_TLS_GOT_HI20:
879 return Type == ELF::R_X86_64_GOTPCRELX || Type == ELF::R_X86_64_REX_GOTPCRELX;
885 return Type == ELF::R_X86_64_GOTPC64;
895 return Type == ELF::R_AARCH64_RELATIVE;
897 return Type == ELF::R_RISCV_RELATIVE;
899 return Type == ELF::R_X86_64_RELATIVE;
908 return Type == ELF::R_AARCH64_IRELATIVE;
912 return Type == ELF::R_X86_64_IRELATIVE;
936 case ELF::R_RISCV_PCREL_LO12_I:
937 case ELF::R_RISCV_PCREL_LO12_S:
947 return ELF::R_AARCH64_NONE;
949 return ELF::R_RISCV_NONE;
951 return ELF::R_X86_64_NONE;
960 return ELF::R_AARCH64_PREL32;
962 return ELF::R_RISCV_32_PCREL;
964 return ELF::R_X86_64_PC32;
973 return ELF::R_AARCH64_PREL64;
977 return ELF::R_X86_64_PC64;
999 return ELF::R_AARCH64_ABS64;
1001 return ELF::R_RISCV_64;
1003 return ELF::R_X86_64_64;
1012 return ELF::R_AARCH64_RELATIVE;
1016 return ELF::R_X86_64_RELATIVE;
1068 case ELF::R_RISCV_ADD32:
1070 case ELF::R_RISCV_SUB32: