Lines Matching full:elfcpp
32 #include "elfcpp.h"
153 case elfcpp::R_MIPS_26:
154 case elfcpp::R_MIPS_PC16:
155 case elfcpp::R_MICROMIPS_26_S1:
156 case elfcpp::R_MICROMIPS_PC7_S1:
157 case elfcpp::R_MICROMIPS_PC10_S1:
158 case elfcpp::R_MICROMIPS_PC16_S1:
159 case elfcpp::R_MICROMIPS_PC23_S2:
162 case elfcpp::R_MIPS16_26:
199 return (r_type == elfcpp::R_MIPS_HI16
200 || r_type == elfcpp::R_MIPS16_HI16
201 || r_type == elfcpp::R_MICROMIPS_HI16);
207 return (r_type == elfcpp::R_MIPS_LO16
208 || r_type == elfcpp::R_MIPS16_LO16
209 || r_type == elfcpp::R_MICROMIPS_LO16);
215 return (r_type == elfcpp::R_MIPS_GOT16
216 || r_type == elfcpp::R_MIPS16_GOT16
217 || r_type == elfcpp::R_MICROMIPS_GOT16);
223 return (r_type == elfcpp::R_MIPS_CALL_LO16
224 || r_type == elfcpp::R_MICROMIPS_CALL_LO16);
230 return (r_type == elfcpp::R_MIPS_GOT_LO16
231 || r_type == elfcpp::R_MICROMIPS_GOT_LO16);
237 return (r_type == elfcpp::R_MIPS_GOT_DISP
238 || r_type == elfcpp::R_MICROMIPS_GOT_DISP);
244 return (r_type == elfcpp::R_MIPS_GOT_PAGE
245 || r_type == elfcpp::R_MICROMIPS_GOT_PAGE);
251 return (r_type == elfcpp::R_MIPS_TLS_GD
252 || r_type == elfcpp::R_MIPS16_TLS_GD
253 || r_type == elfcpp::R_MICROMIPS_TLS_GD);
259 return (r_type == elfcpp::R_MIPS_TLS_GOTTPREL
260 || r_type == elfcpp::R_MIPS16_TLS_GOTTPREL
261 || r_type == elfcpp::R_MICROMIPS_TLS_GOTTPREL);
267 return (r_type == elfcpp::R_MIPS_TLS_LDM
268 || r_type == elfcpp::R_MIPS16_TLS_LDM
269 || r_type == elfcpp::R_MICROMIPS_TLS_LDM);
275 return (r_type == elfcpp::R_MIPS16_26
276 || r_type == elfcpp::R_MIPS16_CALL16);
282 return (r_type == elfcpp::R_MIPS_26
283 || r_type == elfcpp::R_MIPS16_26
284 || r_type == elfcpp::R_MICROMIPS_26_S1);
290 return (r_type == elfcpp::R_MICROMIPS_26_S1
291 || r_type == elfcpp::R_MICROMIPS_PC16_S1
292 || r_type == elfcpp::R_MICROMIPS_PC10_S1
293 || r_type == elfcpp::R_MICROMIPS_PC7_S1);
302 case elfcpp::R_MIPS16_26:
303 case elfcpp::R_MIPS16_GPREL:
304 case elfcpp::R_MIPS16_GOT16:
305 case elfcpp::R_MIPS16_CALL16:
306 case elfcpp::R_MIPS16_HI16:
307 case elfcpp::R_MIPS16_LO16:
308 case elfcpp::R_MIPS16_TLS_GD:
309 case elfcpp::R_MIPS16_TLS_LDM:
310 case elfcpp::R_MIPS16_TLS_DTPREL_HI16:
311 case elfcpp::R_MIPS16_TLS_DTPREL_LO16:
312 case elfcpp::R_MIPS16_TLS_GOTTPREL:
313 case elfcpp::R_MIPS16_TLS_TPREL_HI16:
314 case elfcpp::R_MIPS16_TLS_TPREL_LO16:
328 case elfcpp::R_MICROMIPS_26_S1:
329 case elfcpp::R_MICROMIPS_HI16:
330 case elfcpp::R_MICROMIPS_LO16:
331 case elfcpp::R_MICROMIPS_GPREL16:
332 case elfcpp::R_MICROMIPS_LITERAL:
333 case elfcpp::R_MICROMIPS_GOT16:
334 case elfcpp::R_MICROMIPS_PC7_S1:
335 case elfcpp::R_MICROMIPS_PC10_S1:
336 case elfcpp::R_MICROMIPS_PC16_S1:
337 case elfcpp::R_MICROMIPS_CALL16:
338 case elfcpp::R_MICROMIPS_GOT_DISP:
339 case elfcpp::R_MICROMIPS_GOT_PAGE:
340 case elfcpp::R_MICROMIPS_GOT_OFST:
341 case elfcpp::R_MICROMIPS_GOT_HI16:
342 case elfcpp::R_MICROMIPS_GOT_LO16:
343 case elfcpp::R_MICROMIPS_SUB:
344 case elfcpp::R_MICROMIPS_HIGHER:
345 case elfcpp::R_MICROMIPS_HIGHEST:
346 case elfcpp::R_MICROMIPS_CALL_HI16:
347 case elfcpp::R_MICROMIPS_CALL_LO16:
348 case elfcpp::R_MICROMIPS_SCN_DISP:
349 case elfcpp::R_MICROMIPS_JALR:
350 case elfcpp::R_MICROMIPS_HI0_LO16:
351 case elfcpp::R_MICROMIPS_TLS_GD:
352 case elfcpp::R_MICROMIPS_TLS_LDM:
353 case elfcpp::R_MICROMIPS_TLS_DTPREL_HI16:
354 case elfcpp::R_MICROMIPS_TLS_DTPREL_LO16:
355 case elfcpp::R_MICROMIPS_TLS_GOTTPREL:
356 case elfcpp::R_MICROMIPS_TLS_TPREL_HI16:
357 case elfcpp::R_MICROMIPS_TLS_TPREL_LO16:
358 case elfcpp::R_MICROMIPS_GPREL7_S2:
359 case elfcpp::R_MICROMIPS_PC23_S2:
372 case elfcpp::R_MIPS_HI16:
373 case elfcpp::R_MIPS_GOT16:
374 return lo16_reloc == elfcpp::R_MIPS_LO16;
375 case elfcpp::R_MIPS16_HI16:
376 case elfcpp::R_MIPS16_GOT16:
377 return lo16_reloc == elfcpp::R_MIPS16_LO16;
378 case elfcpp::R_MICROMIPS_HI16:
379 case elfcpp::R_MICROMIPS_GOT16:
380 return lo16_reloc == elfcpp::R_MICROMIPS_LO16;
399 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
620 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
621 typedef Output_data_reloc<elfcpp::SHT_REL, true, size, big_endian>
892 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
929 return ((this->nonvis() & (elfcpp::STO_MIPS16 >> 2))
930 == elfcpp::STO_MIPS16 >> 2);
938 return ((this->nonvis() & (elfcpp::STO_MIPS_ISA >> 2))
939 == elfcpp::STO_MICROMIPS >> 2);
1073 return ((this->nonvis() & (elfcpp::STO_MIPS_FLAGS >> 2))
1074 == (elfcpp::STO_MIPS_PIC >> 2));
1084 & ~((elfcpp::STO_MIPS16 >> 2)
1085 | (elfcpp::STO_MIPS_FLAGS >> 2)))
1086 | (elfcpp::STO_MIPS_PIC >> 2));
1089 this->set_nonvis((this->nonvis() & ~(elfcpp::STO_MIPS_FLAGS >> 2))
1090 | (elfcpp::STO_MIPS_PIC >> 2));
1100 & ((elfcpp::STO_MIPS16 >> 2)
1101 elfcpp::STO_MIPS_FLAGS >> 2)))
1102 | (elfcpp::STO_MIPS_PLT >> 2));
1106 this->set_nonvis((this->nonvis() & ~(elfcpp::STO_MIPS_FLAGS >> 2))
1107 | (elfcpp::STO_MIPS_PLT >> 2));
1351 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
1403 if (r_type == elfcpp::R_MIPS_NONE)
1423 if (r_type == elfcpp::R_MIPS_NONE)
1479 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
1482 typedef typename elfcpp::Swap<size, big_endian>::Valtype Valtype;
1486 const typename elfcpp::Ehdr<size, big_endian>& ehdr)
1496 this->is_pic_ = (ehdr.get_e_flags() & elfcpp::EF_MIPS_PIC) != 0;
1497 this->is_n32_ = elfcpp::abi_n32(ehdr.get_e_flags());
1498 this->is_n64_ = elfcpp::abi_64(ehdr.get_e_ident()[elfcpp::EI_CLASS]);
1518 elfcpp::Elf_Word
1768 elfcpp::Elf_Word processor_specific_flags_;
1842 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
1843 typedef Output_data_reloc<elfcpp::SHT_REL, true, size, big_endian>
1845 typedef typename elfcpp::Swap<size, big_endian>::Valtype Valtype;
1924 elfcpp::Swap<size, big_endian>::writeval(this->got_view_ + offset, value);
2207 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
2262 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
2263 typedef Output_data_reloc<elfcpp::SHT_REL, true,
2276 layout->add_output_section_data(".rel.plt", elfcpp::SHT_REL,
2277 elfcpp::SHF_ALLOC, this->rel_,
2468 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
2590 typedef typename elfcpp::Swap<size, big_endian>::Valtype Valtype;
2593 Mips_output_section_reginfo(const char* name, elfcpp::Elf_Word type,
2594 elfcpp::Elf_Xword flags,
2655 if (sh_type == elfcpp::SHT_RELA)
2661 case elfcpp::R_MIPS_26:
2682 : Copy_relocs<sh_type, size, big_endian>(elfcpp::R_MIPS_COPY)
2718 if (sym->visibility() == elfcpp::STV_HIDDEN
2719 || sym->visibility() == elfcpp::STV_INTERNAL)
2745 if (sym->visibility() == elfcpp::STV_DEFAULT)
2749 if (sym->type() != elfcpp::STT_FUNC)
2866 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
2867 typedef Output_data_reloc<elfcpp::SHT_REL, true, size, big_endian>
2869 typedef Output_data_reloc<elfcpp::SHT_RELA, true, size, big_endian>
2871 typedef typename elfcpp::Swap<32, big_endian>::Valtype Valtype32;
2872 typedef typename elfcpp::Swap<size, big_endian>::Valtype Valtype;
2965 typename elfcpp::Elf_types<size>::Elf_Off
2982 typename elfcpp::Elf_types<size>::Elf_Off
3098 do_should_include_section(elfcpp::Elf_Word sh_type) const
3099 { return sh_type != elfcpp::SHT_MIPS_REGINFO; }
3136 return elfcpp::is_micromips(this->processor_specific_flags());
3145 return elfcpp::abi_n32(this->processor_specific_flags());
3154 return elfcpp::abi_64(this->ei_class_);
3179 const elfcpp::Ehdr<size, big_endian>& ehdr);
3183 const elfcpp::Ehdr<size, !big_endian>&)
3188 do_make_output_section(const char* name, elfcpp::Elf_Word type,
3189 elfcpp::Elf_Xword flags)
3191 if (type == elfcpp::SHT_MIPS_REGINFO)
3204 do_dynamic_tag_custom_value(elfcpp::DT) const;
3210 elfcpp::Sym<size, big_endian> isym(view);
3211 elfcpp::Sym_write<size, big_endian> osym(view);
3241 osym.put_st_other(elfcpp::elf_st_other(sym->visibility(),
3242 mips_sym->nonvis() - (elfcpp::STO_MIPS16 >> 2)));
3251 osym.put_st_other(elfcpp::elf_st_other(sym->visibility(),
3252 mips_sym->nonvis() - (elfcpp::STO_MICROMIPS >> 2)));
3272 const elfcpp::Rel<size, big_endian>& reloc, unsigned int r_type,
3273 const elfcpp::Sym<size, big_endian>& lsym,
3281 const elfcpp::Rela<size, big_endian>& reloc, unsigned int r_type,
3282 const elfcpp::Sym<size, big_endian>& lsym,
3290 const elfcpp::Rela<size, big_endian>* rela,
3291 const elfcpp::Rel<size, big_endian>* rel,
3294 const elfcpp::Sym<size, big_endian>& lsym,
3302 const elfcpp::Rel<size, big_endian>& reloc, unsigned int r_type,
3310 const elfcpp::Rela<size, big_endian>& reloc, unsigned int r_type,
3318 const elfcpp::Rela<size, big_endian>* rela,
3319 const elfcpp::Rel<size, big_endian>* rel,
3330 const elfcpp::Rel<size, big_endian>&,
3332 const elfcpp::Sym<size, big_endian>&)
3341 const elfcpp::Rel<size, big_endian>&,
3351 const elfcpp::Rela<size, big_endian>&,
3353 const elfcpp::Sym<size, big_endian>&)
3362 const elfcpp::Rela<size, big_endian>&,
3397 const elfcpp::Rela<size, big_endian>*,
3398 const elfcpp::Rel<size, big_endian>*,
3409 const elfcpp::Rel<size, big_endian>&,
3419 const elfcpp::Rela<size, big_endian>&,
3495 mips_32bit_flags(elfcpp::Elf_Word);
3539 elf_mips_mach(elfcpp::Elf_Word);
3547 merge_processor_specific_flags(const std::string&, elfcpp::Elf_Word,
3603 Symbol* sym, const elfcpp::Rel<size, big_endian>& reloc)
3626 elf_mips_abi_name(elfcpp::Elf_Word e_flags, unsigned char ei_class);
3628 elf_mips_mach_name(elfcpp::Elf_Word e_flags);
3709 / elfcpp::Elf_sizes<size>::sym_size));
3727 Mips_copy_relocs<elfcpp::SHT_REL, size, big_endian> copy_relocs_;
3760 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
3785 typedef typename elfcpp::Elf_types<size>::Elf_Addr Mips_address;
3786 typedef typename elfcpp::Swap<16, big_endian>::Valtype Valtype16;
3787 typedef typename elfcpp::Swap<32, big_endian>::Valtype Valtype32;
3897 && r_type != elfcpp::R_MICROMIPS_PC7_S1
3898 && r_type != elfcpp::R_MICROMIPS_PC10_S1);
3910 Valtype16 first = elfcpp::Swap<16, big_endian>::readval(view);
3911 Valtype16 second = elfcpp::Swap<16, big_endian>::readval(view + 2);
3915 || (r_type == elfcpp::R_MIPS16_26 && !jal_shuffle))
3917 else if (r_type != elfcpp::R_MIPS16_26)
3924 elfcpp::Swap<32, big_endian>::writeval(view, val);
3934 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(view);
3938 || (r_type == elfcpp::R_MIPS16_26 && !jal_shuffle))
3943 else if (r_type != elfcpp::R_MIPS16_26)
3955 elfcpp::Swap<16, big_endian>::writeval(view + 2, second);
3956 elfcpp::Swap<16, big_endian>::writeval(view, first);
3968 Valtype16 val = elfcpp::Swap<16, big_endian>::readval(wv);
3975 elfcpp::Swap<16, big_endian>::writeval(wv, val);
3991 ? elfcpp::Swap<32, big_endian>::readval(wv)
3994 elfcpp::Swap<32, big_endian>::writeval(wv, x);
4009 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4013 && r_type == elfcpp::R_MIPS_JALR
4028 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4042 ? elfcpp::Swap<32, big_endian>::readval(wv)
4045 elfcpp::Swap<32, big_endian>::writeval(wv, x);
4060 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4065 if (r_type == elfcpp::R_MICROMIPS_26_S1)
4076 && (psymval->value(object, 0) & 3) != (r_type == elfcpp::R_MIPS_26))
4085 (!cross_mode_jump && r_type == elfcpp::R_MICROMIPS_26_S1) ? 1 : 2;
4119 if (r_type == elfcpp::R_MIPS16_26)
4124 else if (r_type == elfcpp::R_MICROMIPS_26_S1)
4152 && r_type == elfcpp::R_MIPS_26
4166 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4179 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4186 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4203 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4210 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4227 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4234 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4251 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4258 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4289 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4310 if (r_type == elfcpp::R_MIPS16_HI16)
4316 else if (r_type == elfcpp::R_MICROMIPS_HI16)
4324 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4354 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4369 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4386 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4440 if (r_type == elfcpp::R_MIPS16_LO16)
4442 else if (r_type == elfcpp::R_MICROMIPS_LO16
4443 || r_type == elfcpp::R_MICROMIPS_HI0_LO16)
4465 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4481 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4484 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4500 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(view);
4510 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4526 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(view);
4546 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4560 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4564 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4576 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4579 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4594 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4599 if (r_type == elfcpp::R_MICROMIPS_GPREL7_S2)
4621 if (r_type == elfcpp::R_MICROMIPS_GPREL7_S2)
4625 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4644 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4649 elfcpp::Swap<32, big_endian>::writeval(wv, x);
4664 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4670 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4685 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4691 elfcpp::Swap<32, big_endian>::writeval(wv, val);
4705 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4710 elfcpp::Swap<32, big_endian>::writeval(wv, x);
4723 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(wv);
4727 elfcpp::Swap<32, big_endian>::writeval(wv, x);
4778 case elfcpp::STV_INTERNAL:
4779 case elfcpp::STV_HIDDEN:
4941 entry->symndx(), elfcpp::R_MIPS_REL32, got, got_offset);
4971 mips_sym, elfcpp::R_MIPS_REL32, got,
4992 target->rel_dyn_section(layout)->add_absolute(elfcpp::R_MIPS_REL32, got,
5001 target->rel_dyn_section(layout)->add_absolute(elfcpp::R_MIPS_REL32, got,
5055 mips_sym, elfcpp::R_MIPS_REL32, got,
5058 elfcpp::R_MIPS_REL32, mips_sym);
5129 unsigned int r_type1 = (size == 32 ? elfcpp::R_MIPS_TLS_DTPMOD32
5130 : elfcpp::R_MIPS_TLS_DTPMOD64);
5131 unsigned int r_type2 = (size == 32 ? elfcpp::R_MIPS_TLS_DTPREL32
5132 : elfcpp::R_MIPS_TLS_DTPREL64);
5160 unsigned int r_type = (size == 32 ? elfcpp::R_MIPS_TLS_TPREL32
5161 : elfcpp::R_MIPS_TLS_TPREL64);
5176 unsigned int r_type = (size == 32 ? elfcpp::R_MIPS_TLS_DTPMOD32
5177 : elfcpp::R_MIPS_TLS_DTPMOD64);
5215 unsigned int r_type1 = (size == 32 ? elfcpp::R_MIPS_TLS_DTPMOD32
5216 : elfcpp::R_MIPS_TLS_DTPMOD64);
5217 unsigned int r_type2 = (size == 32 ? elfcpp::R_MIPS_TLS_DTPREL32
5218 : elfcpp::R_MIPS_TLS_DTPREL64);
5242 unsigned int r_type = (size == 32 ? elfcpp::R_MIPS_TLS_TPREL32
5243 : elfcpp::R_MIPS_TLS_TPREL64);
5649 elfcpp::Swap<size, big_endian>::writeval(wv, value);
5667 Valtype value = elfcpp::Swap<size, big_endian>::readval(wv);
5671 elfcpp::Swap<size, big_endian>::writeval(wv, value);
5702 Valtype value = elfcpp::Swap<size, big_endian>::readval(wv_sec);
5705 elfcpp::Swap<size, big_endian>::writeval(wv_prim, value);
5706 elfcpp::Swap<size, big_endian>::writeval(wv_sec, 0);
5737 if ((shndx == elfcpp::SHN_UNDEF)
5739 && shndx != elfcpp::SHN_UNDEF
5781 case elfcpp::R_MIPS_TLS_DTPMOD32:
5782 case elfcpp::R_MIPS_TLS_DTPMOD64:
5785 case elfcpp::R_MIPS_TLS_DTPREL32:
5786 case elfcpp::R_MIPS_TLS_DTPREL64:
5787 x = value - elfcpp::DTP_OFFSET;
5789 case elfcpp::R_MIPS_TLS_TPREL32:
5790 case elfcpp::R_MIPS_TLS_TPREL64:
5791 x = value - elfcpp::TP_OFFSET;
5798 elfcpp::Swap<size, big_endian>::writeval(wv, x);
5833 elfcpp::Shdr<size, big_endian>
5835 gold_assert(symtabshdr.get_sh_type() == elfcpp::SHT_SYMTAB);
5838 const int sym_size = elfcpp::Elf_sizes<size>::sym_size;
5850 elfcpp::Sym<size, big_endian> sym(psyms);
5852 this->local_symbol_is_mips16_[i] = elfcpp::elf_st_is_mips16(st_other);
5854 elfcpp::elf_st_is_micromips(st_other);
5868 const unsigned char* pehdr = this->get_view(elfcpp::file_header_offset,
5869 elfcpp::Elf_sizes<size>::ehdr_size,
5871 elfcpp::Ehdr<size, big_endian> ehdr(pehdr);
5883 const size_t shdr_size = elfcpp::Elf_sizes<size>::shdr_size;
5888 elfcpp::Shdr<size, big_endian> shdr(ps);
5890 if (shdr.get_sh_type() == elfcpp::SHT_MIPS_REGINFO)
5901 this->gp_ = elfcpp::Swap<size, big_endian>::readval(view + 20);
5904 this->gprmask_ = elfcpp::Swap<size, big_endian>::readval(view);
5905 this->cprmask1_ = elfcpp::Swap<size, big_endian>::readval(view + 4);
5906 this->cprmask2_ = elfcpp::Swap<size, big_endian>::readval(view + 8);
5907 this->cprmask3_ = elfcpp::Swap<size, big_endian>::readval(view + 12);
5908 this->cprmask4_ = elfcpp::Swap<size, big_endian>::readval(view + 16);
6088 offset, symsize, elfcpp::STT_FUNC,
6089 elfcpp::STB_LOCAL,
6090 elfcpp::STV_DEFAULT, 0,
6118 elfcpp::Swap<32, big_endian>::writeval(pov,
6120 elfcpp::Swap<32, big_endian>::writeval(pov + 4,
6122 elfcpp::Swap<32, big_endian>::writeval(pov + 8,
6124 elfcpp
6130 elfcpp::Swap<16, big_endian>::writeval(pov,
6132 elfcpp::Swap<16, big_endian>::writeval(pov + 2,
6136 elfcpp::Swap<16, big_endian>::writeval(pov + 4,
6138 elfcpp::Swap<16, big_endian>::writeval(pov + 6,
6141 elfcpp::Swap<16, big_endian>::writeval(pov + 8,
6143 elfcpp::Swap<16, big_endian>::writeval(pov + 10, target & 0xffff);
6145 elfcpp::Swap<16, big_endian>::writeval(pov + 12,
6147 elfcpp::Swap<16, big_endian>::writeval(pov + 14,
6306 if (r_type == elfcpp::R_MIPS_26)
6320 this->rel_->add_global(gsym, elfcpp::R_MIPS_JUMP_SLOT, this->got_plt_,
6436 elfcpp::Swap<16, big_endian>::writeval(pov,
6438 elfcpp::Swap<16, big_endian>::writeval(pov + 2,
6446 elfcpp::Swap<16, big_endian>::writeval(pov, plt0_entry[i]);
6453 elfcpp::Swap<16, big_endian>::writeval(pov, plt0_entry[0]);
6454 elfcpp::Swap<16, big_endian>::writeval(pov + 2, gotplt_addr_high);
6455 elfcpp::Swap<16, big_endian>::writeval(pov + 4, plt0_entry[2]);
6456 elfcpp::Swap<16, big_endian>::writeval(pov + 6, gotplt_addr_low);
6457 elfcpp::Swap<16, big_endian>::writeval(pov + 8, plt0_entry[4]);
6458 elfcpp::Swap<16, big_endian>::writeval(pov + 10, gotplt_addr_low);
6465 elfcpp::Swap<16, big_endian>::writeval(pov, plt0_entry[i]);
6472 elfcpp::Swap<32, big_endian>::writeval(pov,
6474 elfcpp::Swap<32, big_endian>::writeval(pov + 4,
6476 elfcpp::Swap<32, big_endian>::writeval(pov + 8,
6481 elfcpp::Swap<32, big_endian>::writeval(pov, plt0_entry[i]);
6491 elfcpp::Swap<size, big_endian>::writeval(gotplt_pov, 0);
6492 elfcpp::Swap<size, big_endian>::writeval(gotplt_pov + got_entry_size, 0);
6520 elfcpp::Swap<64, big_endian>::writeval(gotplt_pov, header_address);
6522 elfcpp::Swap<32, big_endian>::writeval(gotplt_pov, header_address);
6532 elfcpp::Swap<32, big_endian>::writeval(pov,
6534 elfcpp::Swap<32, big_endian>::writeval(pov + 4,
6536 elfcpp::Swap<32, big_endian>::writeval(pov + 8, plt_entry[2]);
6537 elfcpp::Swap<32, big_endian>::writeval(pov + 12,
6550 elfcpp::Swap<16, big_endian>::writeval(pov2, plt_entry[0]);
6551 elfcpp::Swap<16, big_endian>::writeval(pov2 + 2, plt_entry[1]);
6552 elfcpp::Swap<16, big_endian>::writeval(pov2 + 4, plt_entry[2]);
6553 elfcpp::Swap<16, big_endian>::writeval(pov2 + 6, plt_entry[3]);
6554 elfcpp::Swap<16, big_endian>::writeval(pov2 + 8, plt_entry[4]);
6555 elfcpp::Swap<16, big_endian>::writeval(pov2 + 10, plt_entry[5]);
6556 elfcpp::Swap<32, big_endian>::writeval(pov2 + 12,
6565 elfcpp::Swap<16, big_endian>::writeval(pov2, plt_entry[0]);
6566 elfcpp::Swap<16, big_endian>::writeval(pov2 + 2,
6568 elfcpp::Swap<16, big_endian>::writeval(pov2 + 4, plt_entry[2]);
6569 elfcpp::Swap<16, big_endian>::writeval(pov2 + 6,
6571 elfcpp::Swap<16, big_endian>::writeval(pov2 + 8, plt_entry[4]);
6572 elfcpp::Swap<16, big_endian>::writeval(pov2 + 10, plt_entry[5]);
6573 elfcpp::Swap<16, big_endian>::writeval(pov2 + 12, plt_entry[6]);
6574 elfcpp::Swap<16, big_endian>::writeval(pov2 + 14,
6596 elfcpp::Swap<16, big_endian>::writeval(pov2,
6598 elfcpp::Swap<16, big_endian>::writeval(
6600 elfcpp::Swap<16, big_endian>::writeval(pov2 + 4, plt_entry[2]);
6601 elfcpp::Swap<16, big_endian>::writeval(pov2 + 6, plt_entry[3]);
6602 elfcpp::Swap<16, big_endian>::writeval(pov2 + 8, plt_entry[4]);
6603 elfcpp::Swap<16, big_endian>::writeval(pov2 + 10, plt_entry[5]);
6968 elfcpp::Swap<32, big_endian>::writeval(pov, lazy_stub[i]);
6969 elfcpp::Swap<32, big_endian>::writeval(pov + 4, lazy_stub[i + 1]);
6977 elfcpp::Swap<32, big_endian>::writeval(pov,
6982 elfcpp::Swap<32, big_endian>::writeval(pov, lazy_stub[i]);
6984 elfcpp::Swap<32, big_endian>::writeval(pov + 4,
7011 elfcpp::Swap<16, big_endian>::writeval(pov, lazy_stub[i]);
7012 elfcpp::Swap<16, big_endian>::writeval(pov + 2, lazy_stub[i + 1]);
7014 elfcpp::Swap<16, big_endian>::writeval(pov + 4, lazy_stub[i + 2]);
7015 elfcpp::Swap<16, big_endian>::writeval(pov + 6, lazy_stub[i + 3]);
7022 elfcpp::Swap<16, big_endian>::writeval(pov, lazy_stub[i]);
7023 elfcpp::Swap<16, big_endian>::writeval(pov + 2,
7028 elfcpp::Swap<16, big_endian>::writeval(pov, lazy_stub[i]);
7029 elfcpp::Swap<16, big_endian>::writeval(pov + 2, lazy_stub[i + 1]);
7031 elfcpp::Swap<16, big_endian>::writeval(pov + 4, lazy_stub[i + 2]);
7032 elfcpp::Swap<16, big_endian>::writeval(pov + 6,
7059 elfcpp::Swap<16, big_endian>::writeval(pov, lazy_stub[i]);
7060 elfcpp::Swap<16, big_endian>::writeval(pov + 2, lazy_stub[i + 1]);
7062 elfcpp::Swap<16, big_endian>::writeval(pov + 4, lazy_stub[i + 2]);
7069 elfcpp::Swap<16, big_endian>::writeval(pov, lazy_stub[i]);
7070 elfcpp::Swap<16, big_endian>::writeval(pov + 2,
7075 elfcpp::Swap<16, big_endian>::writeval(pov, lazy_stub[i]);
7077 elfcpp::Swap<16, big_endian>::writeval(pov + 2, lazy_stub[i + 1]);
7078 elfcpp::Swap<16, big_endian>::writeval(pov + 4,
7109 elfcpp::Swap<size, big_endian>::writeval(view, this->gprmask_);
7110 elfcpp::Swap<size, big_endian>::writeval(view + 4, this->cprmask1_);
7111 elfcpp::Swap<size, big_endian>::writeval(view + 8, this->cprmask2_);
7112 elfcpp::Swap<size, big_endian>::writeval(view + 12, this->cprmask3_);
7113 elfcpp::Swap<size, big_endian>::writeval(view + 16, this->cprmask4_);
7115 elfcpp::Swap<size, big_endian>::writeval(view + 20,
7156 bool can_make_dynamic = (entry.reloc_type_ == elfcpp::R_MIPS_32
7157 || entry.reloc_type_ == elfcpp::R_MIPS_REL32
7158 || entry.reloc_type_ == elfcpp::R_MIPS_64);
7168 target->rel_dyn_section(layout)->add_global(sym, elfcpp::R_MIPS_REL32,
7172 sym, elfcpp::R_MIPS_REL32, entry.output_section_, entry.relobj_,
7250 layout->add_output_section_data(".rel.dyn", elfcpp::SHT_REL,
7251 elfcpp::SHF_ALLOC, this->rel_dyn_,
7260 this->rel_dyn_->add_absolute(elfcpp::R_MIPS_NONE, od, 0);
7278 layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
7279 (elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE |
7280 elfcpp::SHF_MIPS_GPREL),
7287 0, 0, elfcpp::STT_OBJECT,
7288 elfcpp::STB_GLOBAL,
7289 elfcpp::STV_DEFAULT, 0,
7332 elfcpp::STT_OBJECT,
7333 elfcpp::STB_GLOBAL,
7334 elfcpp::STV_DEFAULT, 0,
7343 elfcpp::STT_OBJECT,
7344 elfcpp::STB_GLOBAL,
7345 elfcpp::STV_DEFAULT,
7464 layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
7465 (elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE),
7474 layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS,
7475 (elfcpp::SHF_ALLOC
7476 | elfcpp::SHF_EXECINSTR),
7494 layout->add_output_section_data(".MIPS.stubs", elfcpp::SHT_PROGBITS,
7495 (elfcpp::SHF_ALLOC
7496 | elfcpp::SHF_EXECINSTR),
7511 layout->add_output_section_data(".text", elfcpp::SHT_PROGBITS,
7512 (elfcpp::SHF_ALLOC
7513 | elfcpp::SHF_EXECINSTR),
7540 gold::gc_process_relocs<size, big_endian, Mips, elfcpp::SHT_REL, Scan,
7575 if (sh_type == elfcpp::SHT_REL)
7576 gold::scan_relocs<size, big_endian, Mips, elfcpp::SHT_REL, Scan>(
7588 else if (sh_type == elfcpp::SHT_RELA)
7589 gold::scan_relocs<size, big_endian, Mips, elfcpp::SHT_RELA, Scan>(
7605 Target_mips<size, big_endian>::mips_32bit_flags(elfcpp::Elf_Word flags)
7607 return ((flags & elfcpp::EF_MIPS_32BITMODE) != 0
7608 || (flags & elfcpp::EF_MIPS_ABI) == elfcpp::E_MIPS_ABI_O32
7609 || (flags & elfcpp::EF_MIPS_ABI) == elfcpp::E_MIPS_ABI_EABI32
7610 || (flags & elfcpp::EF_MIPS_ARCH) == elfcpp::E_MIPS_ARCH_1
7611 || (flags & elfcpp::EF_MIPS_ARCH) == elfcpp::E_MIPS_ARCH_2
7612 || (flags & elfcpp::EF_MIPS_ARCH) == elfcpp::E_MIPS_ARCH_32
7613 || (flags & elfcpp::EF_MIPS_ARCH) == elfcpp::E_MIPS_ARCH_32R2);
7619 Target_mips<size, big_endian>::elf_mips_mach(elfcpp::Elf_Word flags)
7621 switch (flags & elfcpp::EF_MIPS_MACH)
7623 case elfcpp::E_MIPS_MACH_3900:
7626 case elfcpp::E_MIPS_MACH_4010:
7629 case elfcpp::E_MIPS_MACH_4100:
7632 case elfcpp::E_MIPS_MACH_4111:
7635 case elfcpp::E_MIPS_MACH_4120:
7638 case elfcpp::E_MIPS_MACH_4650:
7641 case elfcpp::E_MIPS_MACH_5400:
7644 case elfcpp::E_MIPS_MACH_5500:
7647 case elfcpp::E_MIPS_MACH_9000:
7650 case elfcpp::E_MIPS_MACH_SB1:
7653 case elfcpp::E_MIPS_MACH_LS2E:
7656 case elfcpp::E_MIPS_MACH_LS2F:
7659 case elfcpp::E_MIPS_MACH_LS3A:
7662 case elfcpp::E_MIPS_MACH_OCTEON2:
7665 case elfcpp::E_MIPS_MACH_OCTEON:
7668 case elfcpp::E_MIPS_MACH_XLR:
7672 switch (flags & elfcpp::EF_MIPS_ARCH)
7675 case elfcpp::E_MIPS_ARCH_1:
7678 case elfcpp::E_MIPS_ARCH_2:
7681 case elfcpp::E_MIPS_ARCH_3:
7684 case elfcpp::E_MIPS_ARCH_4:
7687 case elfcpp::E_MIPS_ARCH_5:
7690 case elfcpp::E_MIPS_ARCH_32:
7693 case elfcpp::E_MIPS_ARCH_64:
7696 case elfcpp::E_MIPS_ARCH_32R2:
7699 case elfcpp::E_MIPS_ARCH_64R2:
7738 const std::string& name, elfcpp::Elf_Word in_flags,
7750 elfcpp::Elf_Word new_flags = in_flags;
7751 elfcpp::Elf_Word old_flags = this->processor_specific_flags();
7752 elfcpp::Elf_Word merged_flags = this->processor_specific_flags();
7753 merged_flags |= new_flags & elfcpp::EF_MIPS_NOREORDER;
7756 new_flags &= ~elfcpp::EF_MIPS_NOREORDER;
7757 old_flags &= ~elfcpp::EF_MIPS_NOREORDER;
7761 new_flags &= ~elfcpp::EF_MIPS_XGOT;
7762 old_flags &= ~elfcpp::EF_MIPS_XGOT;
7766 new_flags &= ~elfcpp::EF_MIPS_UCODE;
7767 old_flags &= ~elfcpp::EF_MIPS_UCODE;
7771 new_flags |= elfcpp::EF_MIPS_PIC | elfcpp::EF_MIPS_CPIC;
7779 if (((new_flags & (elfcpp::EF_MIPS_PIC | elfcpp::EF_MIPS_CPIC)) != 0)
7780 != ((old_flags & (elfcpp::EF_MIPS_PIC | elfcpp::EF_MIPS_CPIC)) != 0))
7784 if (new_flags & (elfcpp::EF_MIPS_PIC | elfcpp::EF_MIPS_CPIC))
7785 merged_flags |= elfcpp::EF_MIPS_CPIC;
7786 if (!(new_flags & elfcpp::EF_MIPS_PIC))
7787 merged_flags &= ~elfcpp::EF_MIPS_PIC;
7789 new_flags &= ~(elfcpp::EF_MIPS_PIC | elfcpp::EF_MIPS_CPIC);
7790 old_flags &= ~(elfcpp::EF_MIPS_PIC | elfcpp::EF_MIPS_CPIC);
7804 merged_flags &= ~(elfcpp::EF_MIPS_ARCH | elfcpp::EF_MIPS_MACH);
7805 merged_flags |= (new_flags & (elfcpp::EF_MIPS_ARCH
7806 | elfcpp::EF_MIPS_MACH | elfcpp::EF_MIPS_32BITMODE));
7810 if ((old_flags & elfcpp::EF_MIPS_ABI) == 0
7812 && !this->mips_32bit_flags(new_flags & ~elfcpp::EF_MIPS_ABI))
7813 merged_flags |= new_flags & elfcpp::EF_MIPS_ABI;
7822 new_flags &= (~(elfcpp::EF_MIPS_ARCH | elfcpp::EF_MIPS_MACH
7823 | elfcpp::EF_MIPS_32BITMODE));
7824 old_flags &= (~(elfcpp::EF_MIPS_ARCH | elfcpp::EF_MIPS_MACH
7825 | elfcpp::EF_MIPS_32BITMODE));
7829 if ((new_flags & elfcpp::EF_MIPS_ABI) != (old_flags & elfcpp::EF_MIPS_ABI)
7833 if (((new_flags & elfcpp::EF_MIPS_ABI)
7834 && (old_flags & elfcpp::EF_MIPS_ABI))
7841 new_flags &= ~elfcpp::EF_MIPS_ABI;
7842 old_flags &= ~elfcpp::EF_MIPS_ABI;
7847 if ((new_flags & elfcpp::EF_MIPS_ARCH_ASE)
7848 != (old_flags & elfcpp::EF_MIPS_ARCH_ASE))
7850 int old_micro = old_flags & elfcpp::EF_MIPS_ARCH_ASE_MICROMIPS;
7851 int new_micro = new_flags & elfcpp::EF_MIPS_ARCH_ASE_MICROMIPS;
7852 int old_m16 = old_flags & elfcpp::EF_MIPS_ARCH_ASE_M16;
7853 int new_m16 = new_flags & elfcpp::EF_MIPS_ARCH_ASE_M16;
7863 merged_flags |= new_flags & elfcpp::EF_MIPS_ARCH_ASE;
7865 new_flags &= ~ elfcpp::EF_MIPS_ARCH_ASE;
7866 old_flags &= ~ elfcpp::EF_MIPS_ARCH_ASE;
7885 gold_assert(len == elfcpp::Elf_sizes<size>::ehdr_size);
7887 elfcpp::Ehdr<size, big_endian> ehdr(view);
7888 elfcpp::EI_NIDENT];
7889 memcpy(e_ident, ehdr.get_e_ident(), elfcpp::EI_NIDENT);
7891 e_ident[elfcpp::EI_CLASS] = this->ei_class_;
7893 elfcpp::Ehdr_write<size, big_endian> oehdr(view);
7909 off_t offset, const elfcpp::Ehdr<size, big_endian>& ehdr)
7914 if (et == elfcpp::ET_REL
7915 || (et == elfcpp::ET_EXEC && input_file->just_symbols()))
7922 else if (et == elfcpp::ET_DYN)
8005 elfcpp::file_header_offset,
8006 elfcpp::Elf_sizes<size>::ehdr_size,
8009 elfcpp::Ehdr<size, big_endian> ehdr(pehdr);
8010 elfcpp::Elf_Word in_flags = ehdr.get_e_flags();
8011 unsigned char ei_class = ehdr.get_e_ident()[elfcpp::EI_CLASS];
8026 const unsigned char* pehdr = dynobj->get_view(elfcpp::file_header_offset,
8027 elfcpp::Elf_sizes<size>::ehdr_size,
8030 elfcpp::Ehdr<size, big_endian> ehdr(pehdr);
8031 elfcpp::Elf_Word in_flags = ehdr.get_e_flags();
8032 unsigned char ei_class = ehdr.get_e_ident()[elfcpp::EI_CLASS];
8069 nonvis = elfcpp::STO_MICROMIPS >> 2;
8073 0, 0, elfcpp::STT_FUNC,
8074 elfcpp::STB_LOCAL,
8075 elfcpp::STV_DEFAULT, nonvis,
8084 nonvis = elfcpp::STO_MICROMIPS >> 2;
8088 0, 0, elfcpp::STT_FUNC,
8089 elfcpp::STB_LOCAL,
8090 elfcpp::STV_DEFAULT, nonvis,
8124 layout->make_output_segment(elfcpp::PT_NULL, 0);
8130 if ((*p)->type() == elfcpp::SHT_MIPS_REGINFO)
8141 layout->make_output_segment(elfcpp::PT_MIPS_REGINFO,
8142 elfcpp::PF_R);
8144 elfcpp::PF_R);
8165 odyn->add_constant(elfcpp::DT_MIPS_RLD_VERSION, d_val);
8168 d_val = elfcpp::RHF_NOTPOT;
8169 odyn->add_constant(elfcpp::DT_MIPS_FLAGS, d_val);
8175 odyn->add_custom(elfcpp::DT_MIPS_BASE_ADDRESS);
8178 odyn->add_custom(elfcpp::DT_MIPS_SYMTABNO);
8182 odyn->add_custom(elfcpp::DT_MIPS_GOTSYM);
8185 odyn->add_constant(elfcpp::DT_MIPS_LOCAL_GOTNO,
8190 odyn->add_section_address(elfcpp::DT_MIPS_PLTGOT, this->got_plt_);
8197 Target_mips<size, big_endian>::do_dynamic_tag_custom_value(elfcpp::DT tag) const
8201 case elfcpp::DT_MIPS_BASE_ADDRESS:
8207 this->layout_->find_output_segment(elfcpp::PT_LOAD, elfcpp::PF_R, 0);
8212 case elfcpp::DT_MIPS_SYMTABNO:
8216 case elfcpp::DT_MIPS_GOTSYM:
8254 if (sh_type == elfcpp::SHT_REL)
8255 gold::relocate_section<size, big_endian, Mips, elfcpp::SHT_REL,
8267 else if (sh_type == elfcpp::SHT_RELA)
8268 gold::relocate_section<size, big_endian, Mips, elfcpp::SHT_RELA,
8293 case elfcpp::R_MIPS_NONE:
8294 case elfcpp::R_MIPS_TLS_DTPMOD64:
8295 case elfcpp::R_MIPS_TLS_DTPREL64:
8296 case elfcpp::R_MIPS_TLS_TPREL64:
8299 case elfcpp::R_MIPS_32:
8300 case elfcpp::R_MIPS_TLS_DTPMOD32:
8301 case elfcpp::R_MIPS_TLS_DTPREL32:
8302 case elfcpp::R_MIPS_TLS_TPREL32:
8303 case elfcpp::R_MIPS_REL32:
8304 case elfcpp::R_MIPS_PC32:
8305 case elfcpp::R_MIPS_GPREL32:
8306 case elfcpp::R_MIPS_JALR:
8309 case elfcpp::R_MIPS_16:
8310 case elfcpp::R_MIPS_HI16:
8311 case elfcpp::R_MIPS_LO16:
8312 case elfcpp::R_MIPS_GPREL16:
8313 case elfcpp::R_MIPS16_HI16:
8314 case elfcpp::R_MIPS16_LO16:
8315 case elfcpp::R_MIPS_PC16:
8316 case elfcpp::R_MIPS_GOT16:
8317 case elfcpp::R_MIPS16_GOT16:
8318 case elfcpp::R_MIPS_CALL16:
8319 case elfcpp::R_MIPS16_CALL16:
8320 case elfcpp::R_MIPS_GOT_HI16:
8321 case elfcpp::R_MIPS_CALL_HI16:
8322 case elfcpp::R_MIPS_GOT_LO16:
8323 case elfcpp::R_MIPS_CALL_LO16:
8324 case elfcpp::R_MIPS_TLS_DTPREL_HI16:
8325 case elfcpp::R_MIPS_TLS_DTPREL_LO16:
8326 case elfcpp::R_MIPS_TLS_TPREL_HI16:
8327 case elfcpp::R_MIPS_TLS_TPREL_LO16:
8328 case elfcpp::R_MIPS16_GPREL:
8329 case elfcpp::R_MIPS_GOT_DISP:
8330 case elfcpp::R_MIPS_LITERAL:
8331 case elfcpp::R_MIPS_GOT_PAGE:
8332 case elfcpp::R_MIPS_GOT_OFST:
8333 case elfcpp::R_MIPS_TLS_GD:
8334 case elfcpp::R_MIPS_TLS_LDM:
8335 case elfcpp::R_MIPS_TLS_GOTTPREL:
8339 case elfcpp::R_MIPS_26:
8340 case elfcpp::R_MIPS16_26:
8343 case elfcpp::R_MIPS_COPY:
8344 case elfcpp::R_MIPS_JUMP_SLOT:
8372 gold_assert(sh_type == elfcpp::SHT_REL);
8374 typedef Mips_scan_relocatable_relocs<big_endian, elfcpp::SHT_REL,
8377 gold::scan_relocatable_relocs<size, big_endian, elfcpp::SHT_REL,
8402 typename elfcpp::Elf_types<size>::Elf_Off
8411 gold_assert(sh_type == elfcpp::SHT_REL);
8413 gold::relocate_relocs<size, big_endian, elfcpp::SHT_REL>(
8438 typename elfcpp::Elf_types<size>::Elf_Off offset_in_output_section,
8445 gold_assert(sh_type == elfcpp::SHT_REL);
8447 typedef typename Reloc_types<elfcpp::SHT_REL, size, big_endian>::Reloc
8449 typedef typename Reloc_types<elfcpp::SHT_REL, size, big_endian>::Reloc_write
8463 elfcpp::Elf_types<32>::Elf_WXword r_info = reloc.get_r_info();
8464 const unsigned int r_sym = elfcpp::elf_r_sym<size>(r_info);
8465 const unsigned int r_type = elfcpp::elf_r_type<size>(r_info);
8512 reloc_write.put_r_info(elfcpp::elf_r_info<32>(new_symndx, r_type));
8529 case elfcpp::R_MIPS_26:
8531 offset_in_output_section, true, 0, sh_type == elfcpp::SHT_REL, NULL,
8580 const elfcpp::Rela<size, big_endian>* rela,
8581 const elfcpp::Rel<size, big_endian>* rel,
8584 const elfcpp::Sym<size, big_endian>& lsym,
8591 typename elfcpp::Elf_types<size>::Elf_WXword r_info;
8592 typename elfcpp::Elf_types<size>::Elf_Swxword r_addend;
8594 if (rel_type == elfcpp::SHT_RELA)
8607 unsigned int r_sym = elfcpp::elf_r_sym<size>(r_info);
8617 if (r_type == elfcpp::R_MIPS_NONE)
8629 if (r_type == elfcpp::R_MIPS16_26
8635 case elfcpp::R_MIPS_GOT16:
8636 case elfcpp::R_MIPS_CALL16:
8637 case elfcpp::R_MIPS_CALL_HI16:
8638 case elfcpp::R_MIPS_CALL_LO16:
8639 case elfcpp::R_MIPS_GOT_HI16:
8640 case elfcpp::R_MIPS_GOT_LO16:
8641 case elfcpp::R_MIPS_GOT_PAGE:
8642 case elfcpp::R_MIPS_GOT_OFST:
8643 case elfcpp::R_MIPS_GOT_DISP:
8644 case elfcpp::R_MIPS_TLS_GOTTPREL:
8645 case elfcpp::R_MIPS_TLS_GD:
8646 case elfcpp::R_MIPS_TLS_LDM:
8647 case elfcpp::R_MIPS16_GOT16:
8648 case elfcpp::R_MIPS16_CALL16:
8649 case elfcpp::R_MIPS16_TLS_GOTTPREL:
8650 case elfcpp::R_MIPS16_TLS_GD:
8651 case elfcpp::R_MIPS16_TLS_LDM:
8652 case elfcpp::R_MICROMIPS_GOT16:
8653 case elfcpp::R_MICROMIPS_CALL16:
8654 case elfcpp::R_MICROMIPS_CALL_HI16:
8655 case elfcpp::R_MICROMIPS_CALL_LO16:
8656 case elfcpp::R_MICROMIPS_GOT_HI16:
8657 case elfcpp::R_MICROMIPS_GOT_LO16:
8658 case elfcpp::R_MICROMIPS_GOT_PAGE:
8659 case elfcpp::R_MICROMIPS_GOT_OFST:
8660 case elfcpp::R_MICROMIPS_GOT_DISP:
8661 case elfcpp::R_MICROMIPS_TLS_GOTTPREL:
8662 case elfcpp::R_MICROMIPS_TLS_GD:
8663 case elfcpp::R_MICROMIPS_TLS_LDM:
8685 unsigned int r_sym = elfcpp::elf_r_sym<size>(r_info);
8691 case elfcpp::R_MIPS_CALL16:
8692 case elfcpp::R_MIPS16_CALL16:
8693 case elfcpp::R_MICROMIPS_CALL16:
8698 case elfcpp::R_MIPS_GOT_PAGE:
8699 case elfcpp::R_MICROMIPS_GOT_PAGE:
8700 case elfcpp::R_MIPS16_GOT16:
8701 case elfcpp::R_MIPS_GOT16:
8702 case elfcpp::R_MIPS_GOT_HI16:
8703 case elfcpp::R_MIPS_GOT_LO16:
8704 case elfcpp::R_MICROMIPS_GOT16:
8705 case elfcpp::R_MICROMIPS_GOT_HI16:
8706 case elfcpp::R_MICROMIPS_GOT_LO16:
8715 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(view);
8716 Valtype32 addend = (rel_type == elfcpp::SHT_REL ? val & 0xffff
8719 if (rel_type == elfcpp::SHT_REL && got16_reloc(r_type))
8727 case elfcpp::R_MIPS_HI16:
8728 case elfcpp::R_MIPS16_HI16:
8729 case elfcpp::R_MICROMIPS_HI16:
8732 if (rel_type == elfcpp::SHT_REL)
8737 case elfcpp::R_MIPS_LO16:
8738 case elfcpp::R_MIPS16_LO16:
8739 case elfcpp::R_MICROMIPS_LO16:
8741 if (rel_type != elfcpp::SHT_REL)
8794 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(view);
8810 case elfcpp::R_MIPS_32:
8811 case elfcpp::R_MIPS_REL32:
8812 case elfcpp::R_MIPS_64:
8820 unsigned int r_sym = elfcpp::elf_r_sym<32>(r_info);
8822 elfcpp::R_MIPS_REL32,
8829 case elfcpp::R_MIPS_TLS_GOTTPREL:
8830 case elfcpp::R_MIPS16_TLS_GOTTPREL:
8831 case elfcpp::R_MICROMIPS_TLS_GOTTPREL:
8832 case elfcpp::R_MIPS_TLS_LDM:
8833 case elfcpp::R_MIPS16_TLS_LDM:
8834 case elfcpp::R_MICROMIPS_TLS_LDM:
8835 case elfcpp::R_MIPS_TLS_GD:
8836 case elfcpp::R_MIPS16_TLS_GD:
8837 case elfcpp::R_MICROMIPS_TLS_GD:
8839 unsigned int r_sym = elfcpp::elf_r_sym<size>(r_info);
8846 case elfcpp::R_MIPS_TLS_GD:
8847 case elfcpp::R_MIPS16_TLS_GD:
8848 case elfcpp::R_MICROMIPS_TLS_GD:
8874 case elfcpp::R_MIPS_TLS_LDM:
8875 case elfcpp::R_MIPS16_TLS_LDM:
8876 case elfcpp::R_MICROMIPS_TLS_LDM:
8890 case elfcpp::R_MIPS_TLS_GOTTPREL:
8891 case elfcpp::R_MIPS16_TLS_GOTTPREL:
8892 case elfcpp::R_MICROMIPS_TLS_GOTTPREL:
8928 case elfcpp::R_MIPS16_HI16:
8929 case elfcpp::R_MIPS_HI16:
8930 case elfcpp::R_MICROMIPS_HI16:
8938 case elfcpp::R_MIPS16_26:
8939 case elfcpp::R_MIPS_26:
8940 case elfcpp::R_MICROMIPS_26_S1:
8959 const elfcpp::Rel<size, big_endian>& reloc,
8961 const elfcpp::Sym<size, big_endian>& lsym,
8974 (const elfcpp::Rela<size, big_endian>*) NULL,
8976 elfcpp::SHT_REL,
8991 const elfcpp::Rela<size, big_endian>& reloc,
8993 const elfcpp::Sym<size, big_endian>& lsym,
9007 (const elfcpp::Rel<size, big_endian>*) NULL,
9008 elfcpp::SHT_RELA,
9024 const elfcpp::Rela<size, big_endian>* rela,
9025 const elfcpp::Rel<size, big_endian>* rel,
9031 typename elfcpp::Elf_types<size>::Elf_WXword r_info;
9032 typename elfcpp::Elf_types<size>::Elf_Swxword r_addend;
9034 if (rel_type == elfcpp::SHT_RELA)
9047 unsigned int r_sym = elfcpp::elf_r_sym<size>(r_info);
9058 if (r_type == elfcpp::R_MIPS_NONE)
9091 case elfcpp::R_MIPS_GOT16:
9092 case elfcpp::R_MIPS_CALL16:
9093 case elfcpp::R_MIPS_CALL_HI16:
9094 case elfcpp::R_MIPS_CALL_LO16:
9095 case elfcpp::R_MIPS_GOT_HI16:
9096 case elfcpp::R_MIPS_GOT_LO16:
9097 case elfcpp::R_MIPS_GOT_PAGE:
9098 case elfcpp::R_MIPS_GOT_OFST:
9099 case elfcpp::R_MIPS_GOT_DISP:
9100 case elfcpp::R_MIPS_TLS_GOTTPREL:
9101 case elfcpp::R_MIPS_TLS_GD:
9102 case elfcpp::R_MIPS_TLS_LDM:
9103 case elfcpp::R_MIPS16_GOT16:
9104 case elfcpp::R_MIPS16_CALL16:
9105 case elfcpp::R_MIPS16_TLS_GOTTPREL:
9106 case elfcpp::R_MIPS16_TLS_GD:
9107 case elfcpp::R_MIPS16_TLS_LDM:
9108 case elfcpp::R_MICROMIPS_GOT16:
9109 case elfcpp::R_MICROMIPS_CALL16:
9110 case elfcpp::R_MICROMIPS_CALL_HI16:
9111 case elfcpp::R_MICROMIPS_CALL_LO16:
9112 case elfcpp::R_MICROMIPS_GOT_HI16:
9113 case elfcpp::R_MICROMIPS_GOT_LO16:
9114 case elfcpp::R_MICROMIPS_GOT_PAGE:
9115 case elfcpp::R_MICROMIPS_GOT_OFST:
9116 case elfcpp::R_MICROMIPS_GOT_DISP:
9117 case elfcpp::R_MICROMIPS_TLS_GOTTPREL:
9118 case elfcpp::R_MICROMIPS_TLS_GD:
9119 case elfcpp::R_MICROMIPS_TLS_LDM:
9126 case elfcpp::R_MIPS_JALR:
9127 case elfcpp::R_MICROMIPS_JALR:
9130 case elfcpp::R_MIPS_GPREL16:
9131 case elfcpp::R_MIPS_GPREL32:
9132 case elfcpp::R_MIPS16_GPREL:
9133 case elfcpp::R_MICROMIPS_GPREL16:
9143 case elfcpp::R_MIPS_32:
9144 case elfcpp::R_MIPS_REL32:
9145 case elfcpp::R_MIPS_64:
9149 if (r_type != elfcpp::R_MIPS_REL32)
9166 case elfcpp::R_MIPS_26:
9167 case elfcpp::R_MIPS_PC16:
9168 case elfcpp::R_MIPS16_26:
9169 case elfcpp::R_MICROMIPS_26_S1:
9170 case elfcpp::R_MICROMIPS_PC7_S1:
9171 case elfcpp::R_MICROMIPS_PC10_S1:
9172 case elfcpp::R_MICROMIPS_PC16_S1:
9173 case elfcpp::R_MICROMIPS_PC23_S2:
9186 case elfcpp::R_MIPS16_CALL16:
9187 case elfcpp::R_MIPS_CALL16:
9188 case elfcpp::R_MIPS_CALL_HI16:
9189 case elfcpp::R_MIPS_CALL_LO16:
9190 case elfcpp::R_MIPS_JALR:
9191 case elfcpp::R_MICROMIPS_CALL16:
9192 case elfcpp::R_MICROMIPS_CALL_HI16:
9193 case elfcpp::R_MICROMIPS_CALL_LO16:
9194 case elfcpp::R_MICROMIPS_JALR:
9257 target->dynamic_reloc(mips_sym, elfcpp::R_MIPS_REL32, mips_obj,
9269 case elfcpp::R_MIPS_CALL16:
9270 case elfcpp::R_MIPS16_CALL16:
9271 case elfcpp::R_MICROMIPS_CALL16:
9272 case elfcpp::R_MIPS_CALL_HI16:
9273 case elfcpp::R_MIPS_CALL_LO16:
9274 case elfcpp::R_MICROMIPS_CALL_HI16:
9275 case elfcpp::R_MICROMIPS_CALL_LO16:
9279 case elfcpp::R_MIPS16_GOT16:
9280 case elfcpp::R_MIPS_GOT16:
9281 case elfcpp::R_MIPS_GOT_HI16:
9282 case elfcpp::R_MIPS_GOT_LO16:
9283 case elfcpp::R_MICROMIPS_GOT16:
9284 case elfcpp::R_MICROMIPS_GOT_HI16:
9285 case elfcpp::R_MICROMIPS_GOT_LO16:
9286 case elfcpp::R_MIPS_GOT_DISP:
9287 case elfcpp::R_MICROMIPS_GOT_DISP:
9298 case elfcpp::R_MIPS_GOT_PAGE:
9299 case elfcpp::R_MICROMIPS_GOT_PAGE:
9308 Valtype32 val = elfcpp::Swap<32, big_endian>::readval(view);
9309 Valtype32 addend = (rel_type == elfcpp::SHT_REL ? val & 0xffff
9332 case elfcpp::R_MIPS_TLS_GOTTPREL:
9333 case elfcpp::R_MIPS16_TLS_GOTTPREL:
9334 case elfcpp::R_MICROMIPS_TLS_GOTTPREL:
9335 case elfcpp::R_MIPS_TLS_LDM:
9336 case elfcpp::R_MIPS16_TLS_LDM:
9337 case elfcpp::R_MICROMIPS_TLS_LDM:
9338 case elfcpp::R_MIPS_TLS_GD:
9339 case elfcpp::R_MIPS16_TLS_GD:
9340 case elfcpp::R_MICROMIPS_TLS_GD:
9348 case elfcpp::R_MIPS_TLS_GD:
9349 case elfcpp::R_MIPS16_TLS_GD:
9350 case elfcpp::R_MICROMIPS_TLS_GD:
9367 case elfcpp::R_MIPS_TLS_LDM:
9368 case elfcpp::R_MIPS16_TLS_LDM:
9369 case elfcpp::R_MICROMIPS_TLS_LDM:
9383 case elfcpp::R_MIPS_TLS_GOTTPREL:
9384 case elfcpp::R_MIPS16_TLS_GOTTPREL:
9385 case elfcpp::R_MICROMIPS_TLS_GOTTPREL:
9407 case elfcpp::R_MIPS_COPY:
9408 case elfcpp::R_MIPS_JUMP_SLOT:
9428 case elfcpp::R_MIPS16_HI16:
9429 case elfcpp::R_MIPS_HI16:
9430 case elfcpp::R_MICROMIPS_HI16:
9443 case elfcpp::R_MIPS16_26:
9444 case elfcpp::R_MIPS_26:
9445 case elfcpp::R_MICROMIPS_26_S1:
9464 const elfcpp::Rela<size, big_endian>& reloc,
9476 (const elfcpp::Rel<size, big_endian>*) NULL,
9477 elfcpp::SHT_RELA,
9491 const elfcpp::Rel<size, big_endian>& reloc,
9502 (const elfcpp::Rela<size, big_endian>*) NULL,
9504 elfcpp::SHT_REL,
9522 if ((output_section->flags() & elfcpp::SHF_ALLOC) == 0)
9567 const elfcpp::Rela<size, big_endian>* rela,
9568 const elfcpp::Rel<size, big_endian>* rel,
9578 typename elfcpp::Elf_types<size>::Elf_WXword r_info;
9579 typename elfcpp::Elf_types<size>::Elf_Swxword r_addend;
9581 if (rel_type == elfcpp::SHT_RELA)
9600 unsigned int r_sym = elfcpp::elf_r_sym<size>(r_info);
9704 if (r_type != elfcpp::R_MIPS16_26
9708 && (r_type != elfcpp::R_MIPS16_CALL16 || mips_sym->need_fn_stub()))
9741 else if (r_type == elfcpp::R_MIPS16_26 && !parameters->options().relocatable()
9801 else if ((r_type == elfcpp::R_MIPS16_26
9802 || r_type == elfcpp::R_MICROMIPS_26_S1)
9819 if ((r_type == elfcpp::R_MIPS16_26 && target_is_micromips_code)
9834 && ((r_type == elfcpp::R_MIPS16_26 && !target_is_16_bit_code)
9835 || (r_type == elfcpp::R_MICROMIPS_26_S1 && !target_is_micromips_code)
9836 || ((r_type == elfcpp::R_MIPS_26 || r_type == elfcpp::R_MIPS_JALR)
9849 r_type = (micromips_reloc(r_type) ? elfcpp::R_MICROMIPS_GOT_DISP
9850 : elfcpp::R_MIPS_GOT_DISP);
9856 bool extract_addend = rel_type == elfcpp::SHT_REL;
9859 case elfcpp::R_MIPS_NONE:
9861 case elfcpp::R_MIPS_16:
9866 case elfcpp::R_MIPS_32:
9891 case elfcpp::R_MIPS_REL32:
9894 case elfcpp::R_MIPS_PC32:
9899 case elfcpp::R_MIPS16_26:
9904 case elfcpp::R_MIPS_26:
9905 case elfcpp::R_MICROMIPS_26_S1:
9911 case elfcpp::R_MIPS_HI16:
9912 case elfcpp::R_MIPS16_HI16:
9913 case elfcpp::R_MICROMIPS_HI16:
9919 case elfcpp::R_MIPS_LO16:
9920 case elfcpp::R_MIPS16_LO16:
9921 case elfcpp::R_MICROMIPS_LO16:
9922 case elfcpp::R_MICROMIPS_HI0_LO16:
9928 case elfcpp::R_MIPS_LITERAL:
9929 case elfcpp::R_MICROMIPS_LITERAL:
9937 case elfcpp::R_MIPS_GPREL16:
9938 case elfcpp::R_MIPS16_GPREL:
9939 case elfcpp::R_MICROMIPS_GPREL7_S2:
9940 case elfcpp::R_MICROMIPS_GPREL16:
9947 case elfcpp::R_MIPS_PC16:
9951 case elfcpp::R_MICROMIPS_PC7_S1:
9956 case elfcpp::R_MICROMIPS_PC10_S1:
9961 case elfcpp::R_MICROMIPS_PC16_S1:
9966 case elfcpp::R_MIPS_GPREL32:
9971 case elfcpp::R_MIPS_GOT_HI16:
9972 case elfcpp::R_MIPS_CALL_HI16:
9973 case elfcpp::R_MICROMIPS_GOT_HI16:
9974 case elfcpp::R_MICROMIPS_CALL_HI16:
9986 case elfcpp::R_MIPS_GOT_LO16:
9987 case elfcpp::R_MIPS_CALL_LO16:
9988 case elfcpp::R_MICROMIPS_GOT_LO16:
9989 case elfcpp::R_MICROMIPS_CALL_LO16:
10001 case elfcpp::R_MIPS_GOT_DISP:
10002 case elfcpp::R_MICROMIPS_GOT_DISP:
10013 case elfcpp::R_MIPS_CALL16:
10014 case elfcpp::R_MIPS16_CALL16:
10015 case elfcpp::R_MICROMIPS_CALL16:
10026 case elfcpp::R_MIPS_GOT16:
10027 case elfcpp::R_MIPS16_GOT16:
10028 case elfcpp::R_MICROMIPS_GOT16:
10044 case elfcpp::R_MIPS_TLS_GD:
10045 case elfcpp::R_MIPS16_TLS_GD:
10046 case elfcpp::R_MICROMIPS_TLS_GD:
10057 case elfcpp::R_MIPS_TLS_GOTTPREL:
10058 case elfcpp::R_MIPS16_TLS_GOTTPREL:
10059 case elfcpp::R_MICROMIPS_TLS_GOTTPREL:
10072 case elfcpp::R_MIPS_TLS_LDM:
10073 case elfcpp::R_MIPS16_TLS_LDM:
10074 case elfcpp::R_MICROMIPS_TLS_LDM:
10082 case elfcpp::R_MIPS_GOT_PAGE:
10083 case elfcpp::R_MICROMIPS_GOT_PAGE:
10088 case elfcpp::R_MIPS_GOT_OFST:
10089 case elfcpp::R_MICROMIPS_GOT_OFST:
10095 case elfcpp::R_MIPS_JALR:
10096 case elfcpp::R_MICROMIPS_JALR:
10108 case elfcpp::R_MIPS_TLS_DTPREL_HI16:
10109 case elfcpp::R_MIPS16_TLS_DTPREL_HI16:
10110 case elfcpp::R_MICROMIPS_TLS_DTPREL_HI16:
10112 elfcpp::DTP_OFFSET, r_addend,
10115 case elfcpp::R_MIPS_TLS_DTPREL_LO16:
10116 case elfcpp::R_MIPS16_TLS_DTPREL_LO16:
10117 case elfcpp::R_MICROMIPS_TLS_DTPREL_LO16:
10119 elfcpp::DTP_OFFSET, r_addend,
10122 case elfcpp::R_MIPS_TLS_DTPREL32:
10123 case elfcpp::R_MIPS_TLS_DTPREL64:
10125 elfcpp::DTP_OFFSET, r_addend,
10128 case elfcpp::R_MIPS_TLS_TPREL_HI16:
10129 case elfcpp::R_MIPS16_TLS_TPREL_HI16:
10130 case elfcpp::R_MICROMIPS_TLS_TPREL_HI16:
10132 elfcpp::TP_OFFSET, r_addend,
10135 case elfcpp::R_MIPS_TLS_TPREL_LO16:
10136 case elfcpp::R_MIPS16_TLS_TPREL_LO16:
10137 case elfcpp::R_MICROMIPS_TLS_TPREL_LO16:
10139 elfcpp::TP_OFFSET, r_addend,
10142 case elfcpp::R_MIPS_TLS_TPREL32:
10143 case elfcpp::R_MIPS_TLS_TPREL64:
10145 elfcpp::TP_OFFSET, r_addend,
10148 case elfcpp::R_MIPS_SUB:
10149 case elfcpp::R_MICROMIPS_SUB:
10196 const elfcpp::Rela<size, big_endian>& reloc,
10210 (const elfcpp::Rel<size, big_endian>*) NULL,
10211 elfcpp::SHT_RELA,
10227 const elfcpp::Rel<size, big_endian>& reloc,
10240 (const elfcpp::Rela<size, big_endian>*) NULL,
10242 elfcpp::SHT_REL,
10260 case elfcpp::R_MIPS_NONE:
10264 case elfcpp::R_MIPS_16:
10265 case elfcpp::R_MIPS_32:
10266 case elfcpp::R_MIPS_64:
10267 case elfcpp::R_MIPS_HI16:
10268 case elfcpp::R_MIPS_LO16:
10269 case elfcpp::R_MIPS16_HI16:
10270 case elfcpp::R_MIPS16_LO16:
10271 case elfcpp::R_MICROMIPS_HI16:
10272 case elfcpp::R_MICROMIPS_LO16:
10275 case elfcpp::R_MIPS_26:
10276 case elfcpp::R_MIPS16_26:
10277 case elfcpp::R_MICROMIPS_26_S1:
10280 case elfcpp::R_MIPS_GPREL32:
10281 case elfcpp::R_MIPS_GPREL16:
10282 case elfcpp::R_MIPS_REL32:
10283 case elfcpp::R_MIPS16_GPREL:
10286 case elfcpp::R_MIPS_PC16:
10287 case elfcpp::R_MIPS_PC32:
10288 case elfcpp::R_MIPS_JALR:
10289 case elfcpp::R_MICROMIPS_JALR:
10292 case elfcpp::R_MIPS_GOT16:
10293 case elfcpp::R_MIPS_CALL16:
10294 case elfcpp::R_MIPS_GOT_DISP:
10295 case elfcpp::R_MIPS_GOT_HI16:
10296 case elfcpp::R_MIPS_GOT_LO16:
10297 case elfcpp::R_MIPS_CALL_HI16:
10298 case elfcpp::R_MIPS_CALL_LO16:
10299 case elfcpp::R_MIPS_LITERAL:
10300 case elfcpp::R_MIPS_GOT_PAGE:
10301 case elfcpp::R_MIPS_GOT_OFST:
10302 case elfcpp::R_MIPS16_GOT16:
10303 case elfcpp::R_MIPS16_CALL16:
10304 case elfcpp::R_MICROMIPS_GOT16:
10305 case elfcpp::R_MICROMIPS_CALL16:
10306 case elfcpp::R_MICROMIPS_GOT_HI16:
10307 case elfcpp::R_MICROMIPS_GOT_LO16:
10308 case elfcpp::R_MICROMIPS_CALL_HI16:
10309 case elfcpp::R_MICROMIPS_CALL_LO16:
10313 case elfcpp::R_MIPS_TLS_DTPMOD32:
10314 case elfcpp::R_MIPS_TLS_DTPREL32:
10315 case elfcpp::R_MIPS_TLS_DTPMOD64:
10316 case elfcpp::R_MIPS_TLS_DTPREL64:
10317 case elfcpp::R_MIPS_TLS_GD:
10318 case elfcpp::R_MIPS_TLS_LDM:
10319 case elfcpp::R_MIPS_TLS_DTPREL_HI16:
10320 case elfcpp::R_MIPS_TLS_DTPREL_LO16:
10321 case elfcpp::R_MIPS_TLS_GOTTPREL:
10322 case elfcpp::R_MIPS_TLS_TPREL32:
10323 case elfcpp::R_MIPS_TLS_TPREL64:
10324 case elfcpp::R_MIPS_TLS_TPREL_HI16:
10325 case elfcpp::R_MIPS_TLS_TPREL_LO16:
10326 case elfcpp::R_MIPS16_TLS_GD:
10327 case elfcpp::R_MIPS16_TLS_GOTTPREL:
10328 case elfcpp::R_MICROMIPS_TLS_GD:
10329 case elfcpp::R_MICROMIPS_TLS_GOTTPREL:
10330 case elfcpp::R_MICROMIPS_TLS_TPREL_HI16:
10331 case elfcpp::R_MICROMIPS_TLS_TPREL_LO16:
10334 case elfcpp::R_MIPS_COPY:
10335 case elfcpp::R_MIPS_JUMP_SLOT:
10371 Target_mips<size, big_endian>::elf_mips_abi_name(elfcpp::Elf_Word e_flags,
10374 switch (e_flags & elfcpp::EF_MIPS_ABI)
10377 if ((e_flags & elfcpp::EF_MIPS_ABI2) != 0)
10379 else if (elfcpp::abi_64(ei_class))
10383 case elfcpp::E_MIPS_ABI_O32:
10385 case elfcpp::E_MIPS_ABI_O64:
10387 case elfcpp::E_MIPS_ABI_EABI32:
10389 case elfcpp::E_MIPS_ABI_EABI64:
10398 Target_mips<size, big_endian>::elf_mips_mach_name(elfcpp::Elf_Word e_flags)
10400 switch (e_flags & elfcpp::EF_MIPS_MACH)
10402 case elfcpp::E_MIPS_MACH_3900:
10404 case elfcpp::E_MIPS_MACH_4010:
10406 case elfcpp::E_MIPS_MACH_4100:
10408 case elfcpp::E_MIPS_MACH_4111:
10410 case elfcpp::E_MIPS_MACH_4120:
10412 case elfcpp::E_MIPS_MACH_4650:
10414 case elfcpp::E_MIPS_MACH_5400:
10416 case elfcpp::E_MIPS_MACH_5500:
10418 case elfcpp::E_MIPS_MACH_SB1:
10420 case elfcpp::E_MIPS_MACH_9000:
10422 case elfcpp::E_MIPS_MACH_LS2E:
10424 case elfcpp::E_MIPS_MACH_LS2F:
10426 case elfcpp::E_MIPS_MACH_LS3A:
10428 case elfcpp::E_MIPS_MACH_OCTEON:
10430 case elfcpp::E_MIPS_MACH_OCTEON2:
10432 case elfcpp::E_MIPS_MACH_XLR:
10435 switch (e_flags & elfcpp::EF_MIPS_ARCH)
10438 case elfcpp::E_MIPS_ARCH_1:
10441 case elfcpp::E_MIPS_ARCH_2:
10444 case elfcpp::E_MIPS_ARCH_3:
10447 case elfcpp::E_MIPS_ARCH_4:
10450 case elfcpp::E_MIPS_ARCH_5:
10453 case elfcpp::E_MIPS_ARCH_32:
10456 case elfcpp::E_MIPS_ARCH_64:
10459 case elfcpp::E_MIPS_ARCH_32R2:
10462 case elfcpp::E_MIPS_ARCH_64R2:
10474 elfcpp::EM_MIPS, // machine_code
10487 elfcpp::SHN_UNDEF, // small_common_shndx
10488 elfcpp::SHN_UNDEF, // large_common_shndx
10513 elfcpp::EM_MIPS, // machine_code
10526 elfcpp::SHN_UNDEF, // small_common_shndx
10527 elfcpp::SHN_UNDEF, // large_common_shndx
10543 : Target_selector(elfcpp::EM_MIPS, size, big_endian,