Lines Matching full:elfcpp
27 #include "elfcpp.h"
68 typedef Output_data_reloc<elfcpp::SHT_RELA, true,size, big_endian>
171 typename elfcpp::Elf_types<size>::Elf_Addr,
173 typename elfcpp::Elf_types<size>::Elf_Addr,
234 typedef Output_data_reloc<elfcpp::SHT_RELA, true, size, big_endian>
241 rela_irelative_(NULL), copy_relocs_(elfcpp::R_TILEGX_COPY),
292 typename elfcpp::Elf_types<size>::Elf_Addr view_address,
319 typename elfcpp::Elf_types<size>::Elf_Off offset_in_output_section,
322 typename elfcpp::Elf_types<size>::Elf_Addr view_address,
426 typename elfcpp::Elf_types<size>::Elf_Addr r_offset,
428 typename elfcpp::Elf_types<size>::Elf_Swxword r_addend,
431 typename elfcpp::Elf_types<size>::Elf_Addr address,
451 const elfcpp::Rela<size, big_endian>& reloc, unsigned int r_type,
452 const elfcpp::Sym<size, big_endian>& lsym,
460 const elfcpp::Rela<size, big_endian>& reloc, unsigned int r_type,
469 const elfcpp::Rela<size, big_endian>& reloc,
471 const elfcpp::Sym<size, big_endian>& lsym);
479 const elfcpp::Rela<size, big_endian>& reloc,
522 size_t relnum, const elfcpp::Rela<size, big_endian>&,
525 unsigned char*, typename elfcpp::Elf_types<size>::Elf_Addr,
595 Symbol* sym, const elfcpp::Rela<size, big_endian>& reloc)
652 Copy_relocs<elfcpp::SHT_RELA, size, big_endian> copy_relocs_;
664 elfcpp::EM_TILEGX, // machine_code
677 elfcpp::SHN_UNDEF, // small_common_shndx
678 elfcpp::SHN_UNDEF, // large_common_shndx
691 elfcpp::EM_TILEGX, // machine_code
704 elfcpp::SHN_UNDEF, // small_common_shndx
705 elfcpp::SHN_UNDEF, // large_common_shndx
718 elfcpp::EM_TILEGX, // machine_code
731 elfcpp::SHN_UNDEF, // small_common_shndx
732 elfcpp::SHN_UNDEF, // large_common_shndx
745 elfcpp::EM_TILEGX, // machine_code
758 elfcpp::SHN_UNDEF, // small_common_shndx
759 elfcpp::SHN_UNDEF, // large_common_shndx
798 static const Tilegx_howto howto[elfcpp::R_TILEGX_NUM];
808 typename elfcpp::Swap<size, big_endian>::Valtype addend,
809 elfcpp::Elf_Xword srshift, elfcpp::Elf_Xword doffset,
810 elfcpp::Elf_Xword bitmask)
812 typedef typename elfcpp::Swap<valsize, big_endian>::Valtype Valtype;
814 Valtype val = elfcpp::Swap<valsize, big_endian>::readval(wv);
821 elfcpp::Elf_Xword dst_mask = bitmask << doffset;
826 elfcpp::Swap<valsize, big_endian>::writeval(wv, val | (reloc<<doffset));
835 typename elfcpp::Swap<size, big_endian>::Valtype addend,
836 elfcpp::Elf_Xword srshift, elfcpp::Elf_Xword doffset,
837 elfcpp::Elf_Xword bitmask)
839 typedef typename elfcpp::Swap_unaligned<valsize, big_endian>::Valtype
842 Valtype val = elfcpp::Swap_unaligned<valsize, big_endian>::readval(wv);
849 elfcpp::Elf_Xword dst_mask = bitmask << doffset;
854 elfcpp::Swap_unaligned<valsize, big_endian>::writeval(wv,
863 typename elfcpp::Swap<size, big_endian>::Valtype addend,
864 elfcpp::Elf_Xword srshift, elfcpp::Elf_Xword doffset1,
865 elfcpp::Elf_Xword bitmask1, elfcpp::Elf_Xword doffset2,
866 elfcpp::Elf_Xword bitmask2)
868 typedef typename elfcpp::Swap<valsize, big_endian>::Valtype Valtype;
870 Valtype val = elfcpp::Swap<valsize, big_endian>::readval(wv);
877 elfcpp::Elf_Xword dst_mask = (bitmask1 << doffset1)
883 elfcpp::Swap<valsize, big_endian>::writeval(wv, val | reloc);
894 typename elfcpp::Swap<size, big_endian>::Valtype addend,
895 typename elfcpp::Elf_types<size>::Elf_Addr address,
896 elfcpp::Elf_Xword srshift, elfcpp::Elf_Xword doffset,
897 elfcpp::Elf_Xword bitmask)
900 typedef typename elfcpp::Swap<valsize, big_endian>::Valtype Valtype;
902 Valtype val = elfcpp::Swap<valsize, big_endian>::readval(wv);
910 elfcpp::Elf_Xword dst_mask = bitmask << doffset;
914 elfcpp::Swap<valsize, big_endian>::writeval(wv, val | (reloc<<doffset));
922 typename elfcpp::Swap<size, big_endian>::Valtype addend,
923 typename elfcpp::Elf_types<size>::Elf_Addr address,
924 elfcpp::Elf_Xword srshift, elfcpp::Elf_Xword doffset,
925 elfcpp::Elf_Xword bitmask)
928 typedef typename elfcpp::Swap_unaligned<valsize, big_endian>::Valtype
940 elfcpp::Swap<valsize, big_endian>::writeval(wv, reloc << doffset);
948 typename elfcpp::Swap<size, big_endian>::Valtype addend,
949 typename elfcpp::Elf_types<size>::Elf_Addr address,
950 elfcpp::Elf_Xword srshift, elfcpp::Elf_Xword doffset1,
951 elfcpp::Elf_Xword bitmask1, elfcpp::Elf_Xword doffset2,
952 elfcpp
955 typedef typename elfcpp::Swap<valsize, big_endian>::Valtype Valtype;
957 Valtype val = elfcpp::Swap<valsize, big_endian>::readval(wv);
965 elfcpp::Elf_Xword dst_mask = (bitmask1 << doffset1)
971 elfcpp::Swap<valsize, big_endian>::writeval(wv, val | reloc);
983 typename elfcpp::Elf_types<size>::Elf_Addr addend)
993 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1003 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1013 typename elfcpp::Elf_types<size>::Elf_Addr addend,
1014 typename elfcpp::Elf_types<size>::Elf_Addr address)
1024 typename elfcpp::Elf_types<size>::Elf_Addr addend,
1025 typename elfcpp::Elf_types<size>::Elf_Addr address)
1035 typename elfcpp::Elf_types<size>::Elf_Addr addend,
1036 typename elfcpp::Elf_types<size>::Elf_Addr address)
1046 typename elfcpp::Elf_types<size>::Elf_Addr addend,
1050 (elfcpp::Elf_Xword)(r_howto.srshift),
1051 (elfcpp::Elf_Xword)(r_howto.doffset),
1052 (elfcpp::Elf_Xword)((1 << r_howto.bsize) - 1));
1059 typename elfcpp::Elf_types<size>::Elf_Addr addend,
1060 typename elfcpp::Elf_types<size>::Elf_Addr address,
1064 (elfcpp::Elf_Xword)(r_howto.srshift),
1065 (elfcpp::Elf_Xword)(r_howto.doffset),
1066 (elfcpp::Elf_Xword)((1 << r_howto.bsize) - 1));
1073 typename elfcpp::Elf_types<size>::Elf_Addr addend,
1074 typename elfcpp::Elf_types<size>::Elf_Addr address,
1078 elfcpp::Elf_Xword doffset1 = 0llu;
1079 elfcpp::Elf_Xword doffset2 = 0llu;
1080 elfcpp::Elf_Xword dmask1 = 0llu;
1081 elfcpp::Elf_Xword dmask2 = 0llu;
1082 elfcpp::Elf_Xword rshift = 0llu;
1087 case elfcpp::R_TILEGX_BROFF_X1:
1095 case elfcpp::R_TILEGX_DEST_IMM8_X1:
1160 typedef typename elfcpp::Swap<64, big_endian>::Valtype Valtype;
1162 Valtype val = elfcpp::Swap<64, big_endian>::readval(wv);
1167 case elfcpp::R_TILEGX_IMM8_X0_TLS_ADD:
1186 case elfcpp::R_TILEGX_IMM8_X1_TLS_ADD:
1201 case elfcpp::R_TILEGX_IMM8_Y0_TLS_ADD:
1216 case elfcpp::R_TILEGX_IMM8_Y1_TLS_ADD:
1231 case elfcpp::R_TILEGX_IMM8_X0_TLS_GD_ADD:
1246 case elfcpp::R_TILEGX_IMM8_X1_TLS_GD_ADD:
1259 case elfcpp::R_TILEGX_IMM8_Y0_TLS_GD_ADD:
1272 case elfcpp::R_TILEGX_IMM8_Y1_TLS_GD_ADD:
1285 case elfcpp::R_TILEGX_TLS_IE_LOAD:
1300 case elfcpp::R_TILEGX_TLS_GD_CALL:
1319 elfcpp::Swap<64, big_endian>::writeval(wv, val | reloc);
1325 Tilegx_relocate_functions<64, false>::howto[elfcpp::R_TILEGX_NUM] =
1455 Tilegx_relocate_functions<32, false>::howto[elfcpp::R_TILEGX_NUM] =
1585 Tilegx_relocate_functions<64, true>::howto[elfcpp::R_TILEGX_NUM] =
1715 Tilegx_relocate_functions<32, true>::howto[elfcpp::R_TILEGX_NUM] =
1867 layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
1868 (elfcpp::SHF_ALLOC
1869 | elfcpp::SHF_WRITE),
1877 0, 0, elfcpp::STT_OBJECT,
1878 elfcpp::STB_LOCAL,
1879 elfcpp::STV_HIDDEN, 0,
1889 0, 0, elfcpp::STT_OBJECT,
1890 elfcpp::STB_LOCAL,
1891 elfcpp::STV_HIDDEN, 0,
1900 layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
1901 (elfcpp::SHF_ALLOC
1902 | elfcpp::SHF_WRITE),
1921 layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
1922 (elfcpp::SHF_ALLOC
1923 | elfcpp::SHF_WRITE),
1941 layout->add_output_section_data(".rela.dyn", elfcpp::SHT_RELA,
1942 elfcpp::SHF_ALLOC, this->rela_dyn_,
1963 layout->add_output_section_data(".rela.dyn", elfcpp::SHT_RELA,
1964 elfcpp::SHF_ALLOC, this->rela_irelative_,
1979 layout->add_output_section_data(".rela.plt", elfcpp::SHT_RELA,
1980 elfcpp::SHF_ALLOC, this->rel_,
2008 if (gsym->type() == elfcpp::STT_GNU_IFUNC
2118 elfcpp::R_TILEGX_IRELATIVE,
2133 if (gsym->type() == elfcpp::STT_GNU_IFUNC
2137 rela->add_symbolless_global_addend(gsym, elfcpp::R_TILEGX_IRELATIVE,
2143 this->rel_->add_global(gsym, elfcpp::R_TILEGX_JMP_SLOT, this->got_plt_,
2160 layout->add_output_section_data(".rela.plt", elfcpp::SHT_RELA,
2161 elfcpp::SHF_ALLOC, this->irelative_rel_,
2176 elfcpp::STT_NOTYPE, elfcpp::STB_GLOBAL,
2177 elfcpp::STV_HIDDEN, 0, false, true);
2181 elfcpp::STT_NOTYPE, elfcpp::STB_GLOBAL,
2182 elfcpp::STV_HIDDEN, 0, true, true);
2196 if (gsym->type() == elfcpp::STT_GNU_IFUNC
2374 typename elfcpp::Elf_types<size>::Elf_Addr gotplt_base,
2376 typename elfcpp::Elf_types<size>::Elf_Addr plt_base,
2384 typedef typename elfcpp::Swap<TILEGX_INST_BUNDLE_SIZE, big_endian>::Valtype
2390 Valtype val = elfcpp::Swap<TILEGX_INST_BUNDLE_SIZE, big_endian>::readval(wv);
2393 elfcpp::Elf_Xword dst_mask =
2394 (elfcpp::Elf_Xword)(TILEGX_IMM16_MASK) << TILEGX_X0_IMM16_BITOFF;
2397 elfcpp::Swap<TILEGX_INST_BUNDLE_SIZE, big_endian>::writeval(wv,
2402 val = elfcpp::Swap<TILEGX_INST_BUNDLE_SIZE, big_endian>::readval(wv);
2404 dst_mask = (elfcpp::Elf_Xword)(TILEGX_IMM16_MASK) << TILEGX_X1_IMM16_BITOFF;
2407 elfcpp::Swap<TILEGX_INST_BUNDLE_SIZE, big_endian>::writeval(wv,
2412 val = elfcpp::Swap<TILEGX_INST_BUNDLE_SIZE, big_endian>::readval(wv);
2414 dst_mask = (elfcpp::Elf_Xword)(TILEGX_IMM16_MASK) << TILEGX_X0_IMM16_BITOFF;
2417 elfcpp::Swap<TILEGX_INST_BUNDLE_SIZE, big_endian>::writeval(wv,
2422 val = elfcpp::Swap<TILEGX_INST_BUNDLE_SIZE, big_endian>::readval(wv);
2424 dst_mask = (elfcpp::Elf_Xword)(TILEGX_IMM16_MASK) << TILEGX_X1_IMM16_BITOFF;
2427 elfcpp::Swap<TILEGX_INST_BUNDLE_SIZE, big_endian>::writeval(wv,
2432 val = elfcpp::Swap<TILEGX_INST_BUNDLE_SIZE, big_endian>::readval(wv);
2433 dst_mask = (elfcpp::Elf_Xword)(TILEGX_IMM16_MASK) << TILEGX_X0_IMM16_BITOFF;
2436 elfcpp::Swap<TILEGX_INST_BUNDLE_SIZE, big_endian>::writeval(wv,
2465 typename elfcpp::Elf_types<size>::Elf_Addr plt_address = this->address();
2466 typename elfcpp::Elf_types<size>::Elf_Addr got_address =
2497 elfcpp::Swap<size, big_endian>::writeval(got_pov, plt_address);
2528 layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS,
2529 (elfcpp::SHF_ALLOC
2530 | elfcpp::SHF_EXECINSTR),
2619 layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
2620 (elfcpp::SHF_ALLOC
2621 | elfcpp::SHF_WRITE),
2630 0, 0, elfcpp::STT_OBJECT,
2631 elfcpp::STB_LOCAL,
2632 elfcpp::STV_HIDDEN, 0,
2640 0, 0, elfcpp::STT_OBJECT,
2641 elfcpp::STB_LOCAL,
2642 elfcpp::STV_HIDDEN, 0,
2653 layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
2654 (elfcpp::SHF_ALLOC
2655 | elfcpp::SHF_WRITE),
2663 layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
2664 elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE,
2673 layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS,
2674 elfcpp::SHF_ALLOC | elfcpp::SHF_EXECINSTR,
2707 rela_dyn->add_local_relative(obj, r_sym, elfcpp::R_TILEGX_RELATIVE,
2712 size == 32 ? elfcpp::R_TILEGX_TLS_DTPOFF32
2713 : elfcpp::R_TILEGX_TLS_DTPOFF64,
2719 size == 32 ? elfcpp::R_TILEGX_TLS_DTPMOD32
2720 : elfcpp::R_TILEGX_TLS_DTPMOD64,
2752 || gsym->type() == elfcpp::STT_GNU_IFUNC)
2753 rela_dyn->add_global(gsym, elfcpp::R_TILEGX_GLOB_DAT,
2756 rela_dyn->add_global_relative(gsym, elfcpp::R_TILEGX_RELATIVE,
2762 size == 32 ? elfcpp::R_TILEGX_TLS_TPOFF32
2763 : elfcpp::R_TILEGX_TLS_TPOFF64,
2769 size == 32 ? elfcpp::R_TILEGX_TLS_DTPMOD32
2770 : elfcpp::R_TILEGX_TLS_DTPMOD64,
2773 size == 32 ? elfcpp::R_TILEGX_TLS_DTPOFF32
2774 : elfcpp::R_TILEGX_TLS_DTPOFF64,
2834 size == 32 ? elfcpp::R_TILEGX_TLS_DTPMOD32
2835 : elfcpp::R_TILEGX_TLS_DTPMOD64, got,
2925 case elfcpp::R_TILEGX_TLS_GD_CALL:
2926 case elfcpp::R_TILEGX_IMM8_X0_TLS_GD_ADD:
2927 case elfcpp::R_TILEGX_IMM8_X1_TLS_GD_ADD:
2928 case elfcpp::R_TILEGX_IMM8_Y0_TLS_GD_ADD:
2929 case elfcpp::R_TILEGX_IMM8_Y1_TLS_GD_ADD:
2930 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_GD:
2931 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_GD:
2932 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD:
2933 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD:
2934 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD:
2935 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD:
2945 case elfcpp::R_TILEGX_TLS_IE_LOAD:
2946 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_IE:
2947 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_IE:
2948 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE:
2949 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE:
2950 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE:
2951 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE:
2963 case elfcpp::R_TILEGX_IMM8_X0_TLS_ADD:
2964 case elfcpp::R_TILEGX_IMM8_X1_TLS_ADD:
2965 case elfcpp::R_TILEGX_IMM8_Y0_TLS_ADD:
2966 case elfcpp::R_TILEGX_IMM8_Y1_TLS_ADD:
2972 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_LE:
2973 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_LE:
2974 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE:
2975 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE:
2976 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE:
2977 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE:
2995 case elfcpp::R_TILEGX_NONE:
2996 case elfcpp::R_TILEGX_GNU_VTINHERIT:
2997 case elfcpp::R_TILEGX_GNU_VTENTRY:
3001 case elfcpp::R_TILEGX_64:
3002 case elfcpp::R_TILEGX_32:
3003 case elfcpp::R_TILEGX_16:
3004 case elfcpp::R_TILEGX_8:
3007 case elfcpp::R_TILEGX_BROFF_X1:
3008 case elfcpp::R_TILEGX_64_PCREL:
3009 case elfcpp::R_TILEGX_32_PCREL:
3010 case elfcpp::R_TILEGX_16_PCREL:
3011 case elfcpp::R_TILEGX_8_PCREL:
3012 case elfcpp::R_TILEGX_IMM16_X0_HW0_PCREL:
3013 case elfcpp::R_TILEGX_IMM16_X1_HW0_PCREL:
3014 case elfcpp::R_TILEGX_IMM16_X0_HW1_PCREL:
3015 case elfcpp::R_TILEGX_IMM16_X1_HW1_PCREL:
3016 case elfcpp::R_TILEGX_IMM16_X0_HW2_PCREL:
3017 case elfcpp::R_TILEGX_IMM16_X1_HW2_PCREL:
3018 case elfcpp::R_TILEGX_IMM16_X0_HW3_PCREL:
3019 case elfcpp::R_TILEGX_IMM16_X1_HW3_PCREL:
3020 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_PCREL:
3021 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_PCREL:
3022 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_PCREL:
3023 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_PCREL:
3024 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST_PCREL:
3025 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST_PCREL:
3028 case elfcpp::R_TILEGX_JUMPOFF_X1:
3029 case elfcpp::R_TILEGX_JUMPOFF_X1_PLT:
3030 case elfcpp::R_TILEGX_IMM16_X0_HW0_PLT_PCREL:
3031 case elfcpp::R_TILEGX_IMM16_X1_HW0_PLT_PCREL:
3032 case elfcpp::R_TILEGX_IMM16_X0_HW1_PLT_PCREL:
3033 case elfcpp::R_TILEGX_IMM16_X1_HW1_PLT_PCREL:
3034 case elfcpp::R_TILEGX_IMM16_X0_HW2_PLT_PCREL:
3035 case elfcpp::R_TILEGX_IMM16_X1_HW2_PLT_PCREL:
3036 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL:
3037 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL:
3038 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL:
3039 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL:
3040 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL:
3041 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL:
3044 case elfcpp::R_TILEGX_IMM16_X0_HW0:
3045 case elfcpp::R_TILEGX_IMM16_X1_HW0:
3046 case elfcpp::R_TILEGX_IMM16_X0_HW1:
3047 case elfcpp::R_TILEGX_IMM16_X1_HW1:
3048 case elfcpp::R_TILEGX_IMM16_X0_HW2:
3049 case elfcpp::R_TILEGX_IMM16_X1_HW2:
3050 case elfcpp::R_TILEGX_IMM16_X0_HW3:
3051 case elfcpp::R_TILEGX_IMM16_X1_HW3:
3052 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST:
3053 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST:
3054 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST:
3055 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST:
3056 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST:
3057 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST:
3060 case elfcpp::R_TILEGX_IMM16_X0_HW0_GOT:
3061 case elfcpp::R_TILEGX_IMM16_X1_HW0_GOT:
3062 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_GOT:
3063 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_GOT:
3064 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_GOT:
3065 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_GOT:
3069 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_GD:
3070 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_GD:
3071 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_LE:
3072 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_LE:
3073 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE:
3074 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE:
3075 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE:
3076 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE:
3077 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD:
3078 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD:
3079 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD:
3080 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD:
3081 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_IE:
3082 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_IE:
3083 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE:
3084 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE:
3085 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE:
3086 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE:
3087 case elfcpp::R_TILEGX_TLS_DTPOFF64:
3088 case elfcpp::R_TILEGX_TLS_DTPMOD32:
3089 case elfcpp::R_TILEGX_TLS_DTPOFF32:
3090 case elfcpp::R_TILEGX_TLS_TPOFF32:
3091 case elfcpp::R_TILEGX_TLS_GD_CALL:
3092 case elfcpp::R_TILEGX_IMM8_X0_TLS_GD_ADD:
3093 case elfcpp::R_TILEGX_IMM8_X1_TLS_GD_ADD:
3094 case elfcpp::R_TILEGX_IMM8_Y0_TLS_GD_ADD:
3095 case elfcpp::R_TILEGX_IMM8_Y1_TLS_GD_ADD:
3096 case elfcpp::R_TILEGX_TLS_IE_LOAD:
3097 case elfcpp::R_TILEGX_IMM8_X0_TLS_ADD:
3098 case elfcpp::R_TILEGX_IMM8_X1_TLS_ADD:
3099 case elfcpp::R_TILEGX_IMM8_Y0_TLS_ADD:
3100 case elfcpp::R_TILEGX_IMM8_Y1_TLS_ADD:
3103 case elfcpp::R_TILEGX_COPY:
3104 case elfcpp::R_TILEGX_GLOB_DAT:
3105 case elfcpp::R_TILEGX_JMP_SLOT:
3106 case elfcpp::R_TILEGX_RELATIVE:
3107 case elfcpp::R_TILEGX_TLS_TPOFF64:
3108 case elfcpp::R_TILEGX_TLS_DTPMOD64:
3138 case elfcpp::R_TILEGX_RELATIVE:
3139 case elfcpp::R_TILEGX_GLOB_DAT:
3140 case elfcpp::R_TILEGX_JMP_SLOT:
3141 case elfcpp::R_TILEGX_TLS_DTPMOD64:
3142 case elfcpp::R_TILEGX_TLS_DTPOFF64:
3143 case elfcpp::R_TILEGX_TLS_TPOFF64:
3144 case elfcpp::R_TILEGX_8:
3145 case elfcpp::R_TILEGX_16:
3146 case elfcpp::R_TILEGX_32:
3147 case elfcpp::R_TILEGX_64:
3148 case elfcpp::R_TILEGX_COPY:
3149 case elfcpp::R_TILEGX_IMM16_X0_HW0:
3150 case elfcpp::R_TILEGX_IMM16_X1_HW0:
3151 case elfcpp::R_TILEGX_IMM16_X0_HW1:
3152 case elfcpp::R_TILEGX_IMM16_X1_HW1:
3153 case elfcpp::R_TILEGX_IMM16_X0_HW2:
3154 case elfcpp::R_TILEGX_IMM16_X1_HW2:
3155 case elfcpp::R_TILEGX_IMM16_X0_HW3:
3156 case elfcpp::R_TILEGX_IMM16_X1_HW3:
3157 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST:
3158 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST:
3159 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST:
3160 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST:
3161 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST:
3162 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST:
3163 case elfcpp::R_TILEGX_BROFF_X1:
3164 case elfcpp::R_TILEGX_JUMPOFF_X1:
3165 case elfcpp::R_TILEGX_IMM16_X0_HW0_PCREL:
3166 case elfcpp::R_TILEGX_IMM16_X1_HW0_PCREL:
3167 case elfcpp::R_TILEGX_IMM16_X0_HW1_PCREL:
3168 case elfcpp::R_TILEGX_IMM16_X1_HW1_PCREL:
3169 case elfcpp::R_TILEGX_IMM16_X0_HW2_PCREL:
3170 case elfcpp::R_TILEGX_IMM16_X1_HW2_PCREL:
3171 case elfcpp::R_TILEGX_IMM16_X0_HW3_PCREL:
3172 case elfcpp::R_TILEGX_IMM16_X1_HW3_PCREL:
3173 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_PCREL:
3174 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_PCREL:
3175 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_PCREL:
3176 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_PCREL:
3177 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST_PCREL:
3178 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST_PCREL:
3194 case elfcpp::R_TILEGX_NONE:
3224 const elfcpp::Rela<size, big_endian>& reloc,
3226 const elfcpp::Sym<size, big_endian>& lsym,
3233 bool is_ifunc = lsym.get_st_type() == elfcpp::STT_GNU_IFUNC;
3236 unsigned int r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
3242 case elfcpp::R_TILEGX_NONE:
3243 case elfcpp::R_TILEGX_GNU_VTINHERIT:
3244 case elfcpp::R_TILEGX_GNU_VTENTRY:
3250 case elfcpp::R_TILEGX_32:
3251 case elfcpp::R_TILEGX_64:
3254 unsigned int r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
3257 elfcpp::R_TILEGX_RELATIVE,
3267 case elfcpp::R_TILEGX_8:
3268 case elfcpp::R_TILEGX_16:
3269 case elfcpp::R_TILEGX_IMM16_X0_HW0:
3270 case elfcpp::R_TILEGX_IMM16_X1_HW0:
3271 case elfcpp::R_TILEGX_IMM16_X0_HW1:
3272 case elfcpp::R_TILEGX_IMM16_X1_HW1:
3273 case elfcpp::R_TILEGX_IMM16_X0_HW2:
3274 case elfcpp::R_TILEGX_IMM16_X1_HW2:
3275 case elfcpp::R_TILEGX_IMM16_X0_HW3:
3276 case elfcpp::R_TILEGX_IMM16_X1_HW3:
3277 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST:
3278 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST:
3279 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST:
3280 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST:
3281 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST:
3282 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST:
3288 unsigned int r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
3289 if (lsym.get_st_type() != elfcpp::STT_SECTION)
3308 case elfcpp::R_TILEGX_JUMPOFF_X1_PLT:
3309 case elfcpp::R_TILEGX_JUMPOFF_X1:
3310 case elfcpp::R_TILEGX_64_PCREL:
3311 case elfcpp::R_TILEGX_32_PCREL:
3312 case elfcpp::R_TILEGX_16_PCREL:
3313 case elfcpp::R_TILEGX_8_PCREL:
3314 case elfcpp::R_TILEGX_BROFF_X1:
3315 case elfcpp::R_TILEGX_IMM16_X0_HW0_PCREL:
3316 case elfcpp::R_TILEGX_IMM16_X1_HW0_PCREL:
3317 case elfcpp::R_TILEGX_IMM16_X0_HW1_PCREL:
3318 case elfcpp::R_TILEGX_IMM16_X1_HW1_PCREL:
3319 case elfcpp::R_TILEGX_IMM16_X0_HW2_PCREL:
3320 case elfcpp::R_TILEGX_IMM16_X1_HW2_PCREL:
3321 case elfcpp::R_TILEGX_IMM16_X0_HW3_PCREL:
3322 case elfcpp::R_TILEGX_IMM16_X1_HW3_PCREL:
3323 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_PCREL:
3324 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_PCREL:
3325 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_PCREL:
3326 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_PCREL:
3327 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST_PCREL:
3328 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST_PCREL:
3329 case elfcpp::R_TILEGX_IMM16_X0_HW0_PLT_PCREL:
3330 case elfcpp::R_TILEGX_IMM16_X1_HW0_PLT_PCREL:
3331 case elfcpp::R_TILEGX_IMM16_X0_HW1_PLT_PCREL:
3332 case elfcpp::R_TILEGX_IMM16_X1_HW1_PLT_PCREL:
3333 case elfcpp::R_TILEGX_IMM16_X0_HW2_PLT_PCREL:
3334 case elfcpp::R_TILEGX_IMM16_X1_HW2_PLT_PCREL:
3335 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL:
3336 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL:
3337 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL:
3338 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL:
3339 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL:
3340 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL:
3343 case elfcpp::R_TILEGX_IMM16_X0_HW0_GOT:
3344 case elfcpp::R_TILEGX_IMM16_X1_HW0_GOT:
3345 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_GOT:
3346 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_GOT:
3347 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_GOT:
3348 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_GOT:
3353 unsigned int r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
3383 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_GD:
3384 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_GD:
3385 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_LE:
3386 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_LE:
3387 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE:
3388 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE:
3389 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE:
3390 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE:
3391 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD:
3392 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD:
3393 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD:
3394 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD:
3395 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_IE:
3396 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_IE:
3397 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE:
3398 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE:
3399 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE:
3400 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE:
3401 case elfcpp::R_TILEGX_TLS_GD_CALL:
3402 case elfcpp
3403 case elfcpp::R_TILEGX_IMM8_X1_TLS_GD_ADD:
3404 case elfcpp::R_TILEGX_IMM8_Y0_TLS_GD_ADD:
3405 case elfcpp::R_TILEGX_IMM8_Y1_TLS_GD_ADD:
3406 case elfcpp::R_TILEGX_TLS_IE_LOAD:
3407 case elfcpp::R_TILEGX_IMM8_X0_TLS_ADD:
3408 case elfcpp::R_TILEGX_IMM8_X1_TLS_ADD:
3409 case elfcpp::R_TILEGX_IMM8_Y0_TLS_ADD:
3410 case elfcpp::R_TILEGX_IMM8_Y1_TLS_ADD:
3419 case elfcpp::R_TILEGX_TLS_GD_CALL:
3443 case elfcpp::R_TILEGX_TLS_IE_LOAD:
3444 case elfcpp::R_TILEGX_IMM8_X0_TLS_ADD:
3445 case elfcpp::R_TILEGX_IMM8_X1_TLS_ADD:
3446 case elfcpp::R_TILEGX_IMM8_Y0_TLS_ADD:
3447 case elfcpp::R_TILEGX_IMM8_Y1_TLS_ADD:
3448 case elfcpp::R_TILEGX_IMM8_X0_TLS_GD_ADD:
3449 case elfcpp::R_TILEGX_IMM8_X1_TLS_GD_ADD:
3450 case elfcpp::R_TILEGX_IMM8_Y0_TLS_GD_ADD:
3451 case elfcpp::R_TILEGX_IMM8_Y1_TLS_GD_ADD:
3457 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_GD:
3458 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_GD:
3459 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD:
3460 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD:
3461 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD:
3462 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD:
3468 = elfcpp::elf_r_sym<size>(reloc.get_r_info());
3481 ? elfcpp::R_TILEGX_TLS_DTPMOD32
3482 : elfcpp::R_TILEGX_TLS_DTPMOD64);
3489 = elfcpp::elf_r_sym<size>(reloc.get_r_info());
3495 ? elfcpp::R_TILEGX_TLS_TPOFF32
3496 : elfcpp::R_TILEGX_TLS_TPOFF64,
3505 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_IE:
3506 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_IE:
3507 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE:
3508 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE:
3509 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE:
3510 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE:
3519 = elfcpp::elf_r_sym<size>(reloc.get_r_info());
3525 ? elfcpp::R_TILEGX_TLS_TPOFF32
3526 : elfcpp::R_TILEGX_TLS_TPOFF64,
3534 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_LE:
3535 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_LE:
3536 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE:
3537 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE:
3538 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE:
3539 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE:
3543 gold_assert(lsym.get_st_type() != elfcpp::STT_SECTION);
3545 = elfcpp::elf_r_sym<size>(reloc.get_r_info());
3559 case elfcpp::R_TILEGX_COPY:
3560 case elfcpp::R_TILEGX_GLOB_DAT:
3561 case elfcpp::R_TILEGX_JMP_SLOT:
3562 case elfcpp::R_TILEGX_RELATIVE:
3564 case elfcpp::R_TILEGX_TLS_TPOFF32:
3565 case elfcpp::R_TILEGX_TLS_TPOFF64:
3566 case elfcpp::R_TILEGX_TLS_DTPMOD32:
3567 case elfcpp::R_TILEGX_TLS_DTPMOD64:
3568 case elfcpp::R_TILEGX_TLS_DTPOFF32:
3569 case elfcpp::R_TILEGX_TLS_DTPOFF64:
3603 case elfcpp::R_TILEGX_IMM16_X0_HW0:
3604 case elfcpp::R_TILEGX_IMM16_X1_HW0:
3605 case elfcpp::R_TILEGX_IMM16_X0_HW1:
3606 case elfcpp::R_TILEGX_IMM16_X1_HW1:
3607 case elfcpp::R_TILEGX_IMM16_X0_HW2:
3608 case elfcpp::R_TILEGX_IMM16_X1_HW2:
3609 case elfcpp::R_TILEGX_IMM16_X0_HW3:
3610 case elfcpp::R_TILEGX_IMM16_X1_HW3:
3611 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST:
3612 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST:
3613 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST:
3614 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST:
3615 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST:
3616 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST:
3617 case elfcpp::R_TILEGX_IMM16_X0_HW0_PCREL:
3618 case elfcpp::R_TILEGX_IMM16_X1_HW0_PCREL:
3619 case elfcpp::R_TILEGX_IMM16_X0_HW1_PCREL:
3620 case elfcpp::R_TILEGX_IMM16_X1_HW1_PCREL:
3621 case elfcpp::R_TILEGX_IMM16_X0_HW2_PCREL:
3622 case elfcpp::R_TILEGX_IMM16_X1_HW2_PCREL:
3623 case elfcpp::R_TILEGX_IMM16_X0_HW3_PCREL:
3624 case elfcpp::R_TILEGX_IMM16_X1_HW3_PCREL:
3625 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_PCREL:
3626 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_PCREL:
3627 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_PCREL:
3628 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_PCREL:
3629 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST_PCREL:
3630 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST_PCREL:
3631 case elfcpp::R_TILEGX_IMM16_X0_HW0_GOT:
3632 case elfcpp::R_TILEGX_IMM16_X1_HW0_GOT:
3633 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_GOT:
3634 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_GOT:
3635 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_GOT:
3636 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_GOT:
3657 const elfcpp::Rela<size, big_endian>& ,
3659 const elfcpp::Sym<size, big_endian>&)
3677 const elfcpp::Rela<size, big_endian>& ,
3688 && (gsym->visibility() == elfcpp::STV_INTERNAL
3689 || gsym->visibility() == elfcpp::STV_PROTECTED
3690 || gsym->visibility() == elfcpp::STV_HIDDEN))
3704 const elfcpp::Rela<size, big_endian>& reloc,
3716 if (gsym->type() == elfcpp::STT_GNU_IFUNC
3722 case elfcpp::R_TILEGX_NONE:
3723 case elfcpp::R_TILEGX_GNU_VTINHERIT:
3724 case elfcpp::R_TILEGX_GNU_VTENTRY:
3727 case elfcpp::R_TILEGX_DEST_IMM8_X1:
3728 case elfcpp::R_TILEGX_IMM16_X0_HW0:
3729 case elfcpp::R_TILEGX_IMM16_X1_HW0:
3730 case elfcpp::R_TILEGX_IMM16_X0_HW1:
3731 case elfcpp::R_TILEGX_IMM16_X1_HW1:
3732 case elfcpp::R_TILEGX_IMM16_X0_HW2:
3733 case elfcpp::R_TILEGX_IMM16_X1_HW2:
3734 case elfcpp::R_TILEGX_IMM16_X0_HW3:
3735 case elfcpp::R_TILEGX_IMM16_X1_HW3:
3736 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST:
3737 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST:
3738 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST:
3739 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST:
3740 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST:
3741 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST:
3742 case elfcpp::R_TILEGX_64:
3743 case elfcpp::R_TILEGX_32:
3744 case elfcpp::R_TILEGX_16:
3745 case elfcpp::R_TILEGX_8:
3767 else if (((size == 64 && r_type == elfcpp::R_TILEGX_64)
3768 || (size == 32 && r_type == elfcpp::R_TILEGX_32))
3769 && gsym->type() == elfcpp::STT_GNU_IFUNC
3781 unsigned int r_type = elfcpp::R_TILEGX_IRELATIVE;
3787 } else if ((r_type == elfcpp::R_TILEGX_64
3788 || r_type == elfcpp::R_TILEGX_32)
3792 rela_dyn->add_global_relative(gsym, elfcpp::R_TILEGX_RELATIVE,
3810 case elfcpp::R_TILEGX_BROFF_X1:
3811 case elfcpp::R_TILEGX_IMM16_X0_HW0_PCREL:
3812 case elfcpp::R_TILEGX_IMM16_X1_HW0_PCREL:
3813 case elfcpp::R_TILEGX_IMM16_X0_HW1_PCREL:
3814 case elfcpp::R_TILEGX_IMM16_X1_HW1_PCREL:
3815 case elfcpp::R_TILEGX_IMM16_X0_HW2_PCREL:
3816 case elfcpp::R_TILEGX_IMM16_X1_HW2_PCREL:
3817 case elfcpp::R_TILEGX_IMM16_X0_HW3_PCREL:
3818 case elfcpp::R_TILEGX_IMM16_X1_HW3_PCREL:
3819 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_PCREL:
3820 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_PCREL:
3821 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_PCREL:
3822 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_PCREL:
3823 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST_PCREL:
3824 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST_PCREL:
3825 case elfcpp::R_TILEGX_64_PCREL:
3826 case elfcpp::R_TILEGX_32_PCREL:
3827 case elfcpp::R_TILEGX_16_PCREL:
3828 case elfcpp::R_TILEGX_8_PCREL:
3854 case elfcpp::R_TILEGX_IMM16_X0_HW0_GOT:
3855 case elfcpp::R_TILEGX_IMM16_X1_HW0_GOT:
3856 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_GOT:
3857 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_GOT:
3858 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_GOT:
3859 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_GOT:
3867 if (gsym->type() == elfcpp::STT_GNU_IFUNC)
3893 || (gsym->visibility() == elfcpp::STV_PROTECTED
3895 || (gsym->type() == elfcpp::STT_GNU_IFUNC
3898 elfcpp::R_TILEGX_GLOB_DAT);
3905 if (gsym->type() != elfcpp::STT_GNU_IFUNC)
3933 case elfcpp::R_TILEGX_JUMPOFF_X1:
3935 case elfcpp::R_TILEGX_JUMPOFF_X1_PLT:
3936 case elfcpp::R_TILEGX_IMM16_X0_HW0_PLT_PCREL:
3937 case elfcpp::R_TILEGX_IMM16_X1_HW0_PLT_PCREL:
3938 case elfcpp::R_TILEGX_IMM16_X0_HW1_PLT_PCREL:
3939 case elfcpp::R_TILEGX_IMM16_X1_HW1_PLT_PCREL:
3940 case elfcpp::R_TILEGX_IMM16_X0_HW2_PLT_PCREL:
3941 case elfcpp::R_TILEGX_IMM16_X1_HW2_PLT_PCREL:
3942 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL:
3943 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL:
3944 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL:
3945 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL:
3946 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL:
3947 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL:
3963 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_GD:
3964 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_GD:
3965 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_LE:
3966 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_LE:
3967 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE:
3968 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE:
3969 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE:
3970 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE:
3971 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD:
3972 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD:
3973 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD:
3974 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD:
3975 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_IE:
3976 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_IE:
3977 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE:
3978 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE:
3979 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE:
3980 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE:
3981 case elfcpp::R_TILEGX_TLS_GD_CALL:
3982 case elfcpp::R_TILEGX_IMM8_X0_TLS_GD_ADD:
3983 case elfcpp::R_TILEGX_IMM8_X1_TLS_GD_ADD:
3984 case elfcpp::R_TILEGX_IMM8_Y0_TLS_GD_ADD:
3985 case elfcpp::R_TILEGX_IMM8_Y1_TLS_GD_ADD:
3986 case elfcpp::R_TILEGX_TLS_IE_LOAD:
3987 case elfcpp::R_TILEGX_IMM8_X0_TLS_ADD:
3988 case elfcpp::R_TILEGX_IMM8_X1_TLS_ADD:
3989 case elfcpp::R_TILEGX_IMM8_Y0_TLS_ADD:
3990 case elfcpp::R_TILEGX_IMM8_Y1_TLS_ADD:
4000 case elfcpp::R_TILEGX_TLS_GD_CALL:
4019 case elfcpp::R_TILEGX_TLS_IE_LOAD:
4020 case elfcpp::R_TILEGX_IMM8_X0_TLS_ADD:
4021 case elfcpp::R_TILEGX_IMM8_X1_TLS_ADD:
4022 case elfcpp::R_TILEGX_IMM8_Y0_TLS_ADD:
4023 case elfcpp::R_TILEGX_IMM8_Y1_TLS_ADD:
4024 case elfcpp::R_TILEGX_IMM8_X0_TLS_GD_ADD:
4025 case elfcpp::R_TILEGX_IMM8_X1_TLS_GD_ADD:
4026 case elfcpp::R_TILEGX_IMM8_Y0_TLS_GD_ADD:
4027 case elfcpp::R_TILEGX_IMM8_Y1_TLS_GD_ADD:
4033 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_GD:
4034 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_GD:
4035 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD:
4036 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD:
4037 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD:
4038 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD:
4046 ? elfcpp::R_TILEGX_TLS_DTPMOD32
4047 : elfcpp::R_TILEGX_TLS_DTPMOD64,
4049 ? elfcpp::R_TILEGX_TLS_DTPOFF32
4050 : elfcpp::R_TILEGX_TLS_DTPOFF64);
4058 ? elfcpp::R_TILEGX_TLS_TPOFF32
4059 : elfcpp::R_TILEGX_TLS_TPOFF64);
4067 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_IE:
4068 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_IE:
4069 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE:
4070 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE:
4071 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE:
4072 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE:
4082 ? elfcpp::R_TILEGX_TLS_TPOFF32
4083 : elfcpp::R_TILEGX_TLS_TPOFF64);
4090 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_LE:
4091 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_LE:
4092 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE:
4093 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE:
4094 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE:
4095 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE:
4115 case elfcpp::R_TILEGX_COPY:
4116 case elfcpp::R_TILEGX_GLOB_DAT:
4117 case elfcpp::R_TILEGX_JMP_SLOT:
4118 case elfcpp::R_TILEGX_RELATIVE:
4119 case elfcpp::R_TILEGX_TLS_TPOFF32:
4120 case elfcpp::R_TILEGX_TLS_TPOFF64:
4121 case elfcpp::R_TILEGX_TLS_DTPMOD32:
4122 case elfcpp::R_TILEGX_TLS_DTPMOD64:
4123 case elfcpp::R_TILEGX_TLS_DTPOFF32:
4124 case elfcpp::R_TILEGX_TLS_DTPOFF64:
4154 if (sh_type == elfcpp::SHT_REL)
4160 Tilegx, elfcpp::SHT_RELA, Scan,
4193 if (sh_type == elfcpp::SHT_REL)
4200 gold::scan_relocs<size, big_endian, Tilegx, elfcpp::SHT_RELA, Scan>(
4230 elfcpp::STT_NOTYPE,
4231 elfcpp::STB_GLOBAL,
4232 elfcpp::STV_HIDDEN,
4284 elfcpp::PT_LOAD, // segment_type
4285 elfcpp::PF_W, // segment_flags_set
4286 elfcpp::PF(0), // segment_flags_clear
4289 elfcpp::STT_NOTYPE, // type
4290 elfcpp::STB_GLOBAL, // binding
4291 elfcpp::STV_HIDDEN, // visibility
4298 elfcpp::PT_LOAD, // segment_type
4299 elfcpp::PF_W, // segment_flags_set
4300 elfcpp::PF(0), // segment_flags_clear
4303 elfcpp::STT_NOTYPE, // type
4304 elfcpp::STB_GLOBAL, // binding
4305 elfcpp::STV_HIDDEN, // visibility
4326 const elfcpp::Rela<size, big_endian>& rela,
4331 typename elfcpp::Elf_types<size>::Elf_Addr address,
4352 unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
4360 elfcpp::Elf_Xword addend = rela.get_r_addend();
4373 case elfcpp::R_TILEGX_IMM16_X0_HW0_GOT:
4374 case elfcpp::R_TILEGX_IMM16_X1_HW0_GOT:
4375 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_GOT:
4376 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_GOT:
4377 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_GOT:
4378 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_GOT:
4386 unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
4401 case elfcpp::R_TILEGX_NONE:
4402 case elfcpp::R_TILEGX_GNU_VTINHERIT:
4403 case elfcpp::R_TILEGX_GNU_VTENTRY:
4406 case elfcpp::R_TILEGX_IMM16_X0_HW0_GOT:
4407 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_GOT:
4408 case elfcpp::R_TILEGX_IMM16_X1_HW0_GOT:
4409 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_GOT:
4410 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_GOT:
4411 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_GOT:
4419 case elfcpp::R_TILEGX_IMM16_X0_HW0:
4420 case elfcpp::R_TILEGX_IMM16_X1_HW0:
4421 case elfcpp::R_TILEGX_IMM16_X0_HW1:
4422 case elfcpp::R_TILEGX_IMM16_X1_HW1:
4423 case elfcpp::R_TILEGX_IMM16_X0_HW2:
4424 case elfcpp::R_TILEGX_IMM16_X1_HW2:
4425 case elfcpp::R_TILEGX_IMM16_X0_HW3:
4426 case elfcpp::R_TILEGX_IMM16_X1_HW3:
4427 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST:
4428 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST:
4429 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST:
4430 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST:
4431 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST:
4432 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST:
4438 case elfcpp::R_TILEGX_JUMPOFF_X1:
4439 case elfcpp::R_TILEGX_JUMPOFF_X1_PLT:
4451 case elfcpp::R_TILEGX_IMM16_X0_HW0_PLT_PCREL:
4452 case elfcpp::R_TILEGX_IMM16_X0_HW0_PCREL:
4453 case elfcpp::R_TILEGX_IMM16_X1_HW0_PLT_PCREL:
4454 case elfcpp::R_TILEGX_IMM16_X1_HW0_PCREL:
4455 case elfcpp::R_TILEGX_IMM16_X0_HW1_PLT_PCREL:
4456 case elfcpp::R_TILEGX_IMM16_X0_HW1_PCREL:
4457 case elfcpp::R_TILEGX_IMM16_X1_HW1_PLT_PCREL:
4458 case elfcpp::R_TILEGX_IMM16_X1_HW1_PCREL:
4459 case elfcpp::R_TILEGX_IMM16_X0_HW2_PLT_PCREL:
4460 case elfcpp::R_TILEGX_IMM16_X0_HW2_PCREL:
4461 case elfcpp::R_TILEGX_IMM16_X1_HW2_PLT_PCREL:
4462 case elfcpp::R_TILEGX_IMM16_X1_HW2_PCREL:
4463 case elfcpp::R_TILEGX_IMM16_X0_HW3_PCREL:
4464 case elfcpp::R_TILEGX_IMM16_X1_HW3_PCREL:
4465 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL:
4466 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_PCREL:
4467 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL:
4468 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_PCREL:
4469 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL:
4470 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_PCREL:
4471 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL:
4472 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_PCREL:
4473 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL:
4474 case elfcpp::R_TILEGX_IMM16_X0_HW2_LAST_PCREL:
4475 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL:
4476 case elfcpp::R_TILEGX_IMM16_X1_HW2_LAST_PCREL:
4481 case elfcpp::R_TILEGX_BROFF_X1:
4482 case elfcpp::R_TILEGX_DEST_IMM8_X1:
4490 case elfcpp::R_TILEGX_64:
4494 case elfcpp::R_TILEGX_64_PCREL:
4498 case elfcpp::R_TILEGX_32:
4502 case elfcpp::R_TILEGX_32_PCREL:
4506 case elfcpp::R_TILEGX_16:
4510 case elfcpp::R_TILEGX_16_PCREL:
4514 case elfcpp::R_TILEGX_8:
4519 case elfcpp::R_TILEGX_8_PCREL:
4524 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_GD:
4525 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_GD:
4526 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_LE:
4527 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_LE:
4528 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE:
4529 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE:
4530 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE:
4531 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE:
4532 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD:
4533 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD:
4534 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD:
4535 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD:
4536 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_IE:
4537 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_IE:
4538 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE:
4539 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE:
4540 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE:
4541 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE:
4542 case elfcpp::R_TILEGX_TLS_GD_CALL:
4543 case elfcpp::R_TILEGX_IMM8_X0_TLS_GD_ADD:
4544 case elfcpp::R_TILEGX_IMM8_X1_TLS_GD_ADD:
4545 case elfcpp::R_TILEGX_IMM8_Y0_TLS_GD_ADD:
4546 case elfcpp::R_TILEGX_IMM8_Y1_TLS_GD_ADD:
4547 case elfcpp::R_TILEGX_TLS_IE_LOAD:
4548 case elfcpp::R_TILEGX_IMM8_X0_TLS_ADD:
4549 case elfcpp::R_TILEGX_IMM8_X1_TLS_ADD:
4550 case elfcpp::R_TILEGX_IMM8_Y0_TLS_ADD:
4551 case elfcpp::R_TILEGX_IMM8_Y1_TLS_ADD:
4563 case elfcpp::R_TILEGX_TLS_GD_CALL:
4581 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_GD:
4582 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_GD:
4583 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD:
4584 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD:
4585 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD:
4586 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD:
4597 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_IE:
4598 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_IE:
4599 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE:
4600 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE:
4601 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE:
4602 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE:
4614 = elfcpp::elf_r_sym<size>(rela.get_r_info());
4653 case elfcpp::R_TILEGX_IMM16_X0_HW0_TLS_LE:
4654 case elfcpp::R_TILEGX_IMM16_X1_HW0_TLS_LE:
4655 case elfcpp::R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE:
4656 case elfcpp::R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE:
4657 case elfcpp::R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE:
4658 case elfcpp::R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE:
4667 typename elfcpp::Elf_types<size>::Elf_Addr value
4677 case elfcpp::R_TILEGX_TLS_IE_LOAD:
4678 case elfcpp::R_TILEGX_IMM8_X0_TLS_ADD:
4679 case elfcpp::R_TILEGX_IMM8_X1_TLS_ADD:
4680 case elfcpp::R_TILEGX_IMM8_Y0_TLS_ADD:
4681 case elfcpp::R_TILEGX_IMM8_Y1_TLS_ADD:
4682 case elfcpp::R_TILEGX_IMM8_X0_TLS_GD_ADD:
4683 case elfcpp::R_TILEGX_IMM8_X1_TLS_GD_ADD:
4684 case elfcpp::R_TILEGX_IMM8_Y0_TLS_GD_ADD:
4685 case elfcpp::R_TILEGX_IMM8_Y1_TLS_GD_ADD:
4697 case elfcpp::R_TILEGX_COPY:
4698 case elfcpp::R_TILEGX_GLOB_DAT:
4699 case elfcpp::R_TILEGX_JMP_SLOT:
4700 case elfcpp::R_TILEGX_RELATIVE:
4701 case elfcpp::R_TILEGX_TLS_TPOFF32:
4702 case elfcpp::R_TILEGX_TLS_TPOFF64:
4703 case elfcpp::R_TILEGX_TLS_DTPMOD32:
4704 case elfcpp::R_TILEGX_TLS_DTPMOD64:
4705 case elfcpp::R_TILEGX_TLS_DTPOFF32:
4706 case elfcpp::R_TILEGX_TLS_DTPOFF64:
4734 typename elfcpp::Elf_types<size>::Elf_Addr address,
4741 gold_assert(sh_type == elfcpp::SHT_RELA);
4743 gold::relocate_section<size, big_endian, Tilegx, elfcpp::SHT_RELA,
4764 typename elfcpp::Elf_types<size>::Elf_Addr r_offset,
4766 typename elfcpp::Elf_types<size>::Elf_Swxword r_addend,
4769 typename elfcpp::Elf_types<size>::Elf_Addr address,
4816 gold_assert(sh_type == elfcpp::SHT_RELA);
4818 typedef gold::Default_scan_relocatable_relocs<elfcpp::SHT_RELA,
4821 gold::scan_relocatable_relocs<size, big_endian, elfcpp::SHT_RELA,
4846 typename elfcpp::Elf_types<size>::Elf_Off offset_in_output_section,
4849 typename elfcpp::Elf_types<size>::Elf_Addr view_address,
4854 gold_assert(sh_type == elfcpp::SHT_RELA);
4856 gold::relocate_relocs<size, big_endian, elfcpp::SHT_RELA>(
4906 : Target_selector(elfcpp::EM_TILEGX, size, big_endian,