Home | History | Annotate | Download | only in gold

Lines Matching refs:elfcpp

29 #include "elfcpp.h"
57 typedef Output_data_reloc<elfcpp::SHT_RELA, true, size, big_endian> Reloc_section;
62 copy_relocs_(elfcpp::R_SPARC_COPY),
115 typename elfcpp::Elf_types<size>::Elf_Addr view_address,
141 typename elfcpp::Elf_types<size>::Elf_Off
145 typename elfcpp::Elf_types<size>::Elf_Addr view_address,
155 if (sym->type() == elfcpp::STT_SPARC_REGISTER)
217 const elfcpp::Ehdr<size, big_endian>& ehdr);
240 const elfcpp::Rela<size, big_endian>& reloc, unsigned int r_type,
241 const elfcpp::Sym<size, big_endian>& lsym,
249 const elfcpp::Rela<size, big_endian>& reloc, unsigned int r_type,
258 const elfcpp::Rela<size, big_endian>& ,
260 const elfcpp::Sym<size, big_endian>&)
269 const elfcpp::Rela<size,
321 const elfcpp::Rela<size, big_endian>&,
325 typename elfcpp::Elf_types<size>::Elf_Addr,
332 size_t relnum, const elfcpp::Rela<size, big_endian>&,
336 typename elfcpp::Elf_types<size>::Elf_Addr,
342 const elfcpp::Rela<size, big_endian>& rela,
416 Symbol* sym, const elfcpp::Rela<size, big_endian>& reloc)
448 Copy_relocs<elfcpp::SHT_RELA, size, big_endian> copy_relocs_;
454 elfcpp::Elf_Half elf_machine_;
456 elfcpp::Elf_Word elf_flags_;
466 elfcpp::EM_SPARC, // machine_code
479 elfcpp::SHN_UNDEF, // small_common_shndx
480 elfcpp::SHN_UNDEF, // large_common_shndx
493 elfcpp::EM_SPARCV9, // machine_code
506 elfcpp::SHN_UNDEF, // small_common_shndx
507 elfcpp::SHN_UNDEF, // large_common_shndx
526 typename elfcpp::Elf_types<valsize>::Elf_Addr dst_mask,
527 typename elfcpp::Swap<size, big_endian>::Valtype value,
528 typename elfcpp::Swap<size, big_endian>::Valtype addend)
530 typedef typename elfcpp::Swap<valsize, big_endian>::Valtype Valtype;
532 Valtype val = elfcpp::Swap<valsize, big_endian>::readval(wv);
538 elfcpp::Swap<valsize, big_endian>::writeval(wv, val | reloc);
547 typename elfcpp
550 typename elfcpp::Swap<valsize, big_endian>::Valtype addend)
552 typedef typename elfcpp::Swap<valsize, big_endian>::Valtype Valtype;
554 Valtype val = elfcpp::Swap<valsize, big_endian>::readval(wv);
560 elfcpp::Swap<valsize, big_endian>::writeval(wv, val | reloc);
568 unsigned int right_shift, elfcpp::Elf_Xword dst_mask,
571 typename elfcpp::Swap<size, big_endian>::Valtype addend)
573 typedef typename elfcpp::Swap_unaligned<valsize,
576 Valtype val = elfcpp::Swap_unaligned<valsize, big_endian>::readval(wv);
582 elfcpp::Swap_unaligned<valsize, big_endian>::writeval(wv, val | reloc);
591 typename elfcpp::Elf_types<valsize>::Elf_Addr dst_mask,
594 typename elfcpp::Swap<size, big_endian>::Valtype addend,
595 typename elfcpp::Elf_types<size>::Elf_Addr address)
597 typedef typename elfcpp::Swap<valsize, big_endian>::Valtype Valtype;
599 Valtype val = elfcpp::Swap<valsize, big_endian>::readval(wv);
606 elfcpp::Swap<valsize, big_endian>::writeval(wv, val | reloc);
614 typename elfcpp::Swap<size, big_endian>::Valtype addend,
615 typename elfcpp::Elf_types<size>::Elf_Addr address)
617 typedef typename elfcpp::Swap_unaligned<valsize,
622 elfcpp::Swap_unaligned<valsize, big_endian>::writeval(wv, reloc);
634 typename elfcpp::Elf_types<size>::Elf_Addr addend,
635 typename elfcpp::Elf_types<size>::Elf_Addr address)
646 typename elfcpp::Elf_types<size>::Elf_Addr addend,
647 typename elfcpp::Elf_types<size>::Elf_Addr address)
658 typename elfcpp::Elf_types<size>::Elf_Addr addend,
659 typename elfcpp::Elf_types<size>::Elf_Addr address)
670 typename elfcpp::Elf_types<size>::Elf_Addr addend,
671 typename elfcpp::Elf_types<size>::Elf_Addr address)
673 typedef typename elfcpp::Swap<32, true>::Valtype Valtype;
675 Valtype val = elfcpp::Swap<32, true>::readval(wv);
685 elfcpp::Swap<32, true>::writeval(wv, val | reloc);
693 typename elfcpp::Elf_types<size>::Elf_Addr addend,
694 typename elfcpp::Elf_types<size>::Elf_Addr address)
696 typedef typename elfcpp::Swap<32, true>::Valtype Valtype;
698 Valtype val = elfcpp::Swap<32, true>::readval(wv);
708 elfcpp::Swap<32, true>::writeval(wv, val | reloc);
716 typename elfcpp::Elf_types<size>::Elf_Addr addend,
717 typename elfcpp::Elf_types<size>::Elf_Addr address)
728 typename elfcpp::Elf_types<size>::Elf_Addr addend,
729 typename elfcpp::Elf_types<size>::Elf_Addr address)
738 typename elfcpp::Elf_types<size>::Elf_Addr value,
739 typename elfcpp::Elf_types<size>::Elf_Addr addend)
749 typename elfcpp::Elf_types<size>::Elf_Addr addend)
759 typename elfcpp::Elf_types<size>::Elf_Addr addend,
760 typename elfcpp::Elf_types<size>::Elf_Addr address)
769 typename elfcpp::Elf_types<size>::Elf_Addr value,
770 typename elfcpp::Elf_types<size>::Elf_Addr addend)
780 typename elfcpp::Elf_types<size>::Elf_Addr addend)
790 typename elfcpp::Elf_types<size>::Elf_Addr addend,
791 typename elfcpp::Elf_types<size>::Elf_Addr address)
802 typename elfcpp::Elf_types<size>::Elf_Addr addend,
803 typename elfcpp::Elf_types<size>::Elf_Addr addend2)
805 typedef typename elfcpp::Swap<32, true>::Valtype Valtype;
807 Valtype val = elfcpp::Swap<32, true>::readval(wv);
815 elfcpp::Swap<32, true>::writeval(wv, val | reloc);
823 typename elfcpp::Elf_types<size>::Elf_Addr addend)
831 typename elfcpp::Elf_types<size>::Elf_Addr value,
832 typename elfcpp::Elf_types<size>::Elf_Addr addend)
842 typename elfcpp::Elf_types<size>::Elf_Addr addend)
852 typename elfcpp::Elf_types<size>::Elf_Addr addend)
862 typename elfcpp::Elf_types<size>::Elf_Addr addend)
872 typename elfcpp::Elf_types<size>::Elf_Addr addend)
874 This::template rela_ua<64>(view, 0, ~(elfcpp::Elf_Xword) 0,
883 typename elfcpp::Elf_types<size>::Elf_Addr addend,
884 typename elfcpp::Elf_types<size>::Elf_Addr address)
895 typename elfcpp::Elf_types<size>::Elf_Addr addend,
896 typename elfcpp::Elf_types<size>::Elf_Addr address)
907 typename elfcpp::Elf_types<size>::Elf_Addr addend,
908 typename elfcpp::Elf_types<size>::Elf_Addr address)
919 elfcpp::Elf_Xword addend,
920 typename elfcpp::Elf_types<size>::Elf_Addr address)
931 typename elfcpp::Elf_types<size>::Elf_Addr addend)
941 typename elfcpp::Elf_types<size>::Elf_Addr addend)
951 typename elfcpp::Elf_types<size>::Elf_Addr addend)
961 typename elfcpp::Elf_types<size>::Elf_Addr addend)
971 typename elfcpp::Elf_types<size>::Elf_Addr addend)
981 typename elfcpp::Elf_types<size>::Elf_Addr addend,
982 typename elfcpp::Elf_types<size>::Elf_Addr address)
993 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1003 typename elfcpp::Elf_types<size>::Elf_Addr addend,
1004 typename elfcpp::Elf_types<size>::Elf_Addr address)
1015 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1025 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1035 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1045 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1055 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1063 typename elfcpp::Elf_types<size>::Elf_Addr value,
1064 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1072 typename elfcpp::Elf_types<size>::Elf_Addr value,
1073 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1075 typedef typename elfcpp::Swap<32, true>::Valtype Valtype;
1077 Valtype val = elfcpp::Swap<32, true>::readval(wv);
1083 elfcpp::Swap<32, true>::writeval(wv, val | reloc);
1089 typename elfcpp::Elf_types<size>::Elf_Addr value,
1090 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1092 typedef typename elfcpp::Swap<32, true>::Valtype Valtype;
1094 Valtype val = elfcpp::Swap<32, true>::readval(wv);
1104 elfcpp::Swap<32, true>::writeval(wv, val | reloc);
1110 typename elfcpp::Elf_types<size>::Elf_Addr value,
1111 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1113 typedef typename elfcpp::Swap<32, true>::Valtype Valtype;
1115 Valtype val = elfcpp::Swap<32, true>::readval(wv);
1126 elfcpp::Swap<32, true>::writeval(wv, val | reloc);
1134 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1136 typedef typename elfcpp::Swap<32, true>::Valtype Valtype;
1138 Valtype val = elfcpp::Swap<32, true>::readval(wv);
1148 elfcpp::Swap<32, true>::writeval(wv, val | reloc);
1155 typename elfcpp::Elf_types<size>::Elf_Addr value,
1156 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1158 typedef typename elfcpp::Swap<32, true>::Valtype Valtype;
1160 Valtype val = elfcpp::Swap<32, true>::readval(wv);
1167 elfcpp::Swap<32, true>::writeval(wv, val | reloc);
1173 typename elfcpp::Elf_types<size>::Elf_Addr value,
1174 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1176 typedef typename elfcpp::Swap<32, true>::Valtype Valtype;
1178 Valtype val = elfcpp::Swap<32, true>::readval(wv);
1187 elfcpp::Swap<32, true>::writeval(wv, val | reloc);
1195 typename elfcpp::Elf_types<size>::Elf_Addr addend)
1197 typedef typename elfcpp::Swap<32, true>::Valtype Valtype;
1199 Valtype val = elfcpp::Swap<32, true>::readval(wv);
1206 elfcpp::Swap<32, true>::writeval(wv, val | reloc);
1223 layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
1224 (elfcpp::SHF_ALLOC
1225 | elfcpp::SHF_WRITE),
1232 0, 0, elfcpp::STT_OBJECT,
1233 elfcpp::STB_LOCAL,
1234 elfcpp::STV_HIDDEN, 0,
1251 layout->add_output_section_data(".rela.dyn", elfcpp::SHT_RELA,
1252 elfcpp::SHF_ALLOC, this->rela_dyn_,
1273 layout->add_output_section_data(".rela.dyn", elfcpp::SHT_RELA,
1274 elfcpp::SHF_ALLOC, this->rela_ifunc_,
1288 typedef Output_data_reloc<elfcpp::SHT_RELA, true,
1455 layout->add_output_section_data(".rela.plt", elfcpp::SHT_RELA,
1456 elfcpp::SHF_ALLOC, this->rel_,
1480 if (gsym->type() == elfcpp::STT_GNU_IFUNC
1501 this->rel_->add_global(gsym, elfcpp::R_SPARC_JMP_SLOT, this,
1553 p->rel->add_symbolless_global_addend(p->gsym, elfcpp::R_SPARC_JMP_IREL,
1568 elfcpp::R_SPARC_JMP_IREL,
1585 layout->add_output_section_data(".rela.plt", elfcpp::SHT_RELA,
1586 elfcpp
1601 elfcpp::STT_NOTYPE, elfcpp::STB_GLOBAL,
1602 elfcpp::STV_HIDDEN, 0, false, true);
1606 elfcpp::STT_NOTYPE, elfcpp::STB_GLOBAL,
1607 elfcpp::STV_HIDDEN, 0, true, true);
1620 if (gsym->type() == elfcpp::STT_GNU_IFUNC
1678 elfcpp::Swap<32, true>::writeval(pov + 0x00,
1680 elfcpp::Swap<32, true>::writeval(pov + 0x04,
1685 elfcpp::Swap<32, true>::writeval(pov + 0x08, sparc_nop);
1686 elfcpp::Swap<32, true>::writeval(pov + 0x0c, sparc_nop);
1687 elfcpp::Swap<32, true>::writeval(pov + 0x10, sparc_nop);
1688 elfcpp::Swap<32, true>::writeval(pov + 0x14, sparc_nop);
1689 elfcpp::Swap<32, true>::writeval(pov + 0x18, sparc_nop);
1690 elfcpp::Swap<32, true>::writeval(pov + 0x1c, sparc_nop);
1708 elfcpp::Swap<32, true>::writeval(pov + 0x00,
1710 elfcpp::Swap<32, true>::writeval(pov + 0x04,
1712 elfcpp::Swap<32, true>::writeval(pov + 0x08,
1714 elfcpp::Swap<32, true>::writeval(pov + 0x0c,
1717 elfcpp::Swap<32, true>::writeval(pov + 0x10,
1719 elfcpp::Swap<32, true>::writeval(pov + 0x14,
1722 elfcpp::Swap<64, big_endian>::writeval(
1724 (elfcpp::Elf_Xword) (oview - (pov + 0x04)));
1739 elfcpp::Swap<32, true>::writeval(pov + 0x00,
1741 elfcpp::Swap<32, true>::writeval(pov + 0x04,
1743 elfcpp::Swap<32, true>::writeval(pov + 0x08,
1745 elfcpp::Swap<32, true>::writeval(pov + 0x0c,
1748 elfcpp::Swap<32, true>::writeval(pov + 0x10,
1750 elfcpp::Swap<32, true>::writeval(pov + 0x14,
1753 elfcpp::Swap<64, big_endian>::writeval(
1755 (elfcpp::Elf_Xword) (oview - (pov + 0x04)));
1767 elfcpp::Swap<32, true>::writeval(pov + 0x00,
1769 elfcpp::Swap<32, true>::writeval(pov + 0x04,
1773 elfcpp::Swap<32, true>::writeval(pov + 0x08, sparc_nop);
1779 elfcpp::Swap<32, true>::writeval(pov, sparc_nop);
1804 layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS,
1805 (elfcpp::SHF_ALLOC
1806 | elfcpp::SHF_EXECINSTR
1807 | elfcpp::SHF_WRITE),
1814 0, 0, elfcpp::STT_OBJECT,
1815 elfcpp::STB_LOCAL,
1816 elfcpp::STV_HIDDEN, 0,
1906 elfcpp::R_SPARC_TLS_DTPMOD64 :
1907 elfcpp::R_SPARC_TLS_DTPMOD32), got,
1929 case elfcpp::R_SPARC_TLS_GD_HI22: // Global-dynamic
1930 case elfcpp::R_SPARC_TLS_GD_LO10:
1931 case elfcpp::R_SPARC_TLS_GD_ADD:
1932 case elfcpp::R_SPARC_TLS_GD_CALL:
1941 case elfcpp::R_SPARC_TLS_LDM_HI22: // Local-dynamic
1942 case elfcpp::R_SPARC_TLS_LDM_LO10:
1943 case elfcpp::R_SPARC_TLS_LDM_ADD:
1944 case elfcpp::R_SPARC_TLS_LDM_CALL:
1950 case elfcpp::R_SPARC_TLS_LDO_HIX22: // Alternate local-dynamic
1951 case elfcpp::R_SPARC_TLS_LDO_LOX10:
1952 case elfcpp::R_SPARC_TLS_LDO_ADD:
1956 case elfcpp::R_SPARC_TLS_IE_HI22: // Initial-exec
1957 case elfcpp::R_SPARC_TLS_IE_LO10:
1958 case elfcpp::R_SPARC_TLS_IE_LD:
1959 case elfcpp::R_SPARC_TLS_IE_LDX:
1960 case elfcpp::R_SPARC_TLS_IE_ADD:
1969 case elfcpp::R_SPARC_TLS_LE_HIX22: // Local-exec
1970 case elfcpp::R_SPARC_TLS_LE_LOX10:
1989 case elfcpp::R_SPARC_NONE:
1990 case elfcpp::R_SPARC_REGISTER:
1991 case elfcpp::R_SPARC_GNU_VTINHERIT:
1992 case elfcpp::R_SPARC_GNU_VTENTRY:
1996 case elfcpp::R_SPARC_UA64:
1997 case elfcpp::R_SPARC_64:
1998 case elfcpp::R_SPARC_HIX22:
1999 case elfcpp::R_SPARC_LOX10:
2000 case elfcpp::R_SPARC_H34:
2001 case elfcpp::R_SPARC_H44:
2002 case elfcpp::R_SPARC_M44:
2003 case elfcpp::R_SPARC_L44:
2004 case elfcpp::R_SPARC_HH22:
2005 case elfcpp::R_SPARC_HM10:
2006 case elfcpp::R_SPARC_LM22:
2007 case elfcpp::R_SPARC_HI22:
2008 case elfcpp::R_SPARC_LO10:
2009 case elfcpp::R_SPARC_OLO10:
2010 case elfcpp::R_SPARC_UA32:
2011 case elfcpp::R_SPARC_32:
2012 case elfcpp::R_SPARC_UA16:
2013 case elfcpp::R_SPARC_16:
2014 case elfcpp::R_SPARC_11:
2015 case elfcpp::R_SPARC_10:
2016 case elfcpp::R_SPARC_8:
2017 case elfcpp::R_SPARC_7:
2018 case elfcpp::R_SPARC_6:
2019 case elfcpp::R_SPARC_5:
2022 case elfcpp::R_SPARC_DISP8:
2023 case elfcpp::R_SPARC_DISP16:
2024 case elfcpp::R_SPARC_DISP32:
2025 case elfcpp::R_SPARC_DISP64:
2026 case elfcpp::R_SPARC_PC_HH22:
2027 case elfcpp::R_SPARC_PC_HM10:
2028 case elfcpp::R_SPARC_PC_LM22:
2029 case elfcpp::R_SPARC_PC10:
2030 case elfcpp::R_SPARC_PC22:
2031 case elfcpp::R_SPARC_WDISP30:
2032 case elfcpp::R_SPARC_WDISP22:
2033 case elfcpp::R_SPARC_WDISP19:
2034 case elfcpp::R_SPARC_WDISP16:
2035 case elfcpp::R_SPARC_WDISP10:
2038 case elfcpp::R_SPARC_PLT64:
2039 case elfcpp::R_SPARC_PLT32:
2040 case elfcpp::R_SPARC_HIPLT22:
2041 case elfcpp::R_SPARC_LOPLT10:
2042 case elfcpp::R_SPARC_PCPLT10:
2045 case elfcpp::R_SPARC_PCPLT32:
2046 case elfcpp::R_SPARC_PCPLT22:
2047 case elfcpp::R_SPARC_WPLT30:
2050 case elfcpp::R_SPARC_GOTDATA_OP:
2051 case elfcpp::R_SPARC_GOTDATA_OP_HIX22:
2052 case elfcpp::R_SPARC_GOTDATA_OP_LOX10:
2053 case elfcpp::R_SPARC_GOT10:
2054 case elfcpp::R_SPARC_GOT13:
2055 case elfcpp::R_SPARC_GOT22:
2059 case elfcpp::R_SPARC_TLS_GD_HI22: // Global-dynamic
2060 case elfcpp::R_SPARC_TLS_GD_LO10:
2061 case elfcpp::R_SPARC_TLS_GD_ADD:
2062 case elfcpp::R_SPARC_TLS_GD_CALL:
2063 case elfcpp::R_SPARC_TLS_LDM_HI22: // Local-dynamic
2064 case elfcpp::R_SPARC_TLS_LDM_LO10:
2065 case elfcpp::R_SPARC_TLS_LDM_ADD:
2066 case elfcpp::R_SPARC_TLS_LDM_CALL:
2067 case elfcpp::R_SPARC_TLS_LDO_HIX22: // Alternate local-dynamic
2068 case elfcpp::R_SPARC_TLS_LDO_LOX10:
2069 case elfcpp::R_SPARC_TLS_LDO_ADD:
2070 case elfcpp::R_SPARC_TLS_LE_HIX22:
2071 case elfcpp::R_SPARC_TLS_LE_LOX10:
2072 case elfcpp::R_SPARC_TLS_IE_HI22: // Initial-exec
2073 case elfcpp::R_SPARC_TLS_IE_LO10:
2074 case elfcpp::R_SPARC_TLS_IE_LD:
2075 case elfcpp::R_SPARC_TLS_IE_LDX:
2076 case elfcpp::R_SPARC_TLS_IE_ADD:
2079 case elfcpp::R_SPARC_COPY:
2080 case elfcpp::R_SPARC_GLOB_DAT:
2081 case elfcpp::R_SPARC_JMP_SLOT:
2082 case elfcpp::R_SPARC_JMP_IREL:
2083 case elfcpp::R_SPARC_RELATIVE:
2084 case elfcpp::R_SPARC_IRELATIVE:
2085 case elfcpp::R_SPARC_TLS_DTPMOD64:
2086 case elfcpp::R_SPARC_TLS_DTPMOD32:
2087 case elfcpp::R_SPARC_TLS_DTPOFF64:
2088 case elfcpp::R_SPARC_TLS_DTPOFF32:
2089 case elfcpp::R_SPARC_TLS_TPOFF64:
2090 case elfcpp::R_SPARC_TLS_TPOFF32:
2128 gold_assert(r_type != elfcpp::R_SPARC_NONE);
2135 case elfcpp::R_SPARC_RELATIVE:
2136 case elfcpp::R_SPARC_IRELATIVE:
2137 case elfcpp::R_SPARC_COPY:
2138 case elfcpp::R_SPARC_64:
2139 case elfcpp::R_SPARC_GLOB_DAT:
2140 case elfcpp::R_SPARC_JMP_SLOT:
2141 case elfcpp::R_SPARC_JMP_IREL:
2142 case elfcpp::R_SPARC_TLS_DTPMOD64:
2143 case elfcpp::R_SPARC_TLS_DTPOFF64:
2144 case elfcpp::R_SPARC_TLS_TPOFF64:
2145 case elfcpp::R_SPARC_TLS_LE_HIX22:
2146 case elfcpp::R_SPARC_TLS_LE_LOX10:
2147 case elfcpp::R_SPARC_8:
2148 case elfcpp::R_SPARC_16:
2149 case elfcpp::R_SPARC_DISP8:
2150 case elfcpp::R_SPARC_DISP16:
2151 case elfcpp::R_SPARC_DISP32:
2152 case elfcpp::R_SPARC_WDISP30:
2153 case elfcpp::R_SPARC_LO10:
2154 case elfcpp::R_SPARC_HI22:
2155 case elfcpp::R_SPARC_OLO10:
2156 case elfcpp::R_SPARC_H34:
2157 case elfcpp::R_SPARC_H44:
2158 case elfcpp::R_SPARC_M44:
2159 case elfcpp::R_SPARC_L44:
2160 case elfcpp::R_SPARC_HH22:
2161 case elfcpp::R_SPARC_HM10:
2162 case elfcpp::R_SPARC_LM22:
2163 case elfcpp::R_SPARC_UA16:
2164 case elfcpp::R_SPARC_UA32:
2165 case elfcpp::R_SPARC_UA64:
2177 case elfcpp::R_SPARC_RELATIVE:
2178 case elfcpp::R_SPARC_IRELATIVE:
2179 case elfcpp::R_SPARC_COPY:
2180 case elfcpp::R_SPARC_GLOB_DAT:
2181 case elfcpp::R_SPARC_32:
2182 case elfcpp::R_SPARC_JMP_SLOT:
2183 case elfcpp::R_SPARC_JMP_IREL:
2184 case elfcpp::R_SPARC_TLS_DTPMOD32:
2185 case elfcpp::R_SPARC_TLS_DTPOFF32:
2186 case elfcpp::R_SPARC_TLS_TPOFF32:
2187 case elfcpp::R_SPARC_TLS_LE_HIX22:
2188 case elfcpp::R_SPARC_TLS_LE_LOX10:
2189 case elfcpp::R_SPARC_8:
2190 case elfcpp::R_SPARC_16:
2191 case elfcpp::R_SPARC_DISP8:
2192 case elfcpp::R_SPARC_DISP16:
2193 case elfcpp::R_SPARC_DISP32:
2194 case elfcpp::R_SPARC_LO10:
2195 case elfcpp::R_SPARC_WDISP30:
2196 case elfcpp::R_SPARC_HI22:
2197 case elfcpp::R_SPARC_UA16:
2198 case elfcpp::R_SPARC_UA32:
2245 const elfcpp::Rela<size, big_endian>& reloc,
2247 const elfcpp::Sym<size, big_endian>& lsym,
2253 bool is_ifunc = lsym.get_st_type() == elfcpp::STT_GNU_IFUNC;
2260 unsigned int r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
2266 case elfcpp::R_SPARC_NONE:
2267 case elfcpp::R_SPARC_REGISTER:
2268 case elfcpp::R_SPARC_GNU_VTINHERIT:
2269 case elfcpp::R_SPARC_GNU_VTENTRY:
2272 case elfcpp::R_SPARC_64:
2273 case elfcpp::R_SPARC_32:
2283 unsigned int r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
2284 rela_dyn->add_local_relative(object, r_sym, elfcpp::R_SPARC_RELATIVE,
2291 case elfcpp::R_SPARC_HIX22:
2292 case elfcpp::R_SPARC_LOX10:
2293 case elfcpp::R_SPARC_H34:
2294 case elfcpp::R_SPARC_H44:
2295 case elfcpp::R_SPARC_M44:
2296 case elfcpp::R_SPARC_L44:
2297 case elfcpp::R_SPARC_HH22:
2298 case elfcpp::R_SPARC_HM10:
2299 case elfcpp::R_SPARC_LM22:
2300 case elfcpp::R_SPARC_UA64:
2301 case elfcpp::R_SPARC_UA32:
2302 case elfcpp::R_SPARC_UA16:
2303 case elfcpp::R_SPARC_HI22:
2304 case elfcpp::R_SPARC_LO10:
2305 case elfcpp::R_SPARC_OLO10:
2306 case elfcpp::R_SPARC_16:
2307 case elfcpp::R_SPARC_11:
2308 case elfcpp::R_SPARC_10:
2309 case elfcpp::R_SPARC_8:
2310 case elfcpp::R_SPARC_7:
2311 case elfcpp::R_SPARC_6:
2312 case elfcpp::R_SPARC_5:
2319 unsigned int r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
2322 if (lsym.get_st_type() != elfcpp::STT_SECTION)
2339 case elfcpp::R_SPARC_WDISP30:
2340 case elfcpp::R_SPARC_WPLT30:
2341 case elfcpp::R_SPARC_WDISP22:
2342 case elfcpp::R_SPARC_WDISP19:
2343 case elfcpp::R_SPARC_WDISP16:
2344 case elfcpp::R_SPARC_WDISP10:
2345 case elfcpp::R_SPARC_DISP8:
2346 case elfcpp::R_SPARC_DISP16:
2347 case elfcpp::R_SPARC_DISP32:
2348 case elfcpp::R_SPARC_DISP64:
2349 case elfcpp::R_SPARC_PC10:
2350 case elfcpp::R_SPARC_PC22:
2353 case elfcpp::R_SPARC_GOTDATA_OP:
2354 case elfcpp::R_SPARC_GOTDATA_OP_HIX22:
2355 case elfcpp::R_SPARC_GOTDATA_OP_LOX10:
2360 case elfcpp::R_SPARC_GOT10:
2361 case elfcpp::R_SPARC_GOT13:
2362 case elfcpp::R_SPARC_GOT22:
2369 r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
2381 elfcpp::R_SPARC_RELATIVE,
2392 case elfcpp::R_SPARC_TLS_GD_HI22: // Global-dynamic
2393 case elfcpp::R_SPARC_TLS_GD_LO10:
2394 case elfcpp::R_SPARC_TLS_GD_ADD:
2395 case elfcpp::R_SPARC_TLS_GD_CALL:
2396 case elfcpp::R_SPARC_TLS_LDM_HI22 : // Local-dynamic
2397 case elfcpp::R_SPARC_TLS_LDM_LO10:
2398 case elfcpp::R_SPARC_TLS_LDM_ADD:
2399 case elfcpp::R_SPARC_TLS_LDM_CALL:
2400 case elfcpp::R_SPARC_TLS_LDO_HIX22: // Alternate local-dynamic
2401 case elfcpp::R_SPARC_TLS_LDO_LOX10:
2402 case elfcpp::R_SPARC_TLS_LDO_ADD:
2403 case elfcpp::R_SPARC_TLS_IE_HI22: // Initial-exec
2404 case elfcpp::R_SPARC_TLS_IE_LO10:
2405 case elfcpp::R_SPARC_TLS_IE_LD:
2406 case elfcpp::R_SPARC_TLS_IE_LDX:
2407 case elfcpp::R_SPARC_TLS_IE_ADD:
2408 case elfcpp::R_SPARC_TLS_LE_HIX22: // Local-exec
2409 case elfcpp::R_SPARC_TLS_LE_LOX10:
2416 case elfcpp::R_SPARC_TLS_GD_HI22: // Global-dynamic
2417 case elfcpp::R_SPARC_TLS_GD_LO10:
2418 case elfcpp::R_SPARC_TLS_GD_ADD:
2419 case elfcpp::R_SPARC_TLS_GD_CALL:
2426 unsigned int r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
2439 ? elfcpp::R_SPARC_TLS_DTPMOD64
2440 : elfcpp::R_SPARC_TLS_DTPMOD32));
2441 if (r_type == elfcpp::R_SPARC_TLS_GD_CALL)
2448 case elfcpp::R_SPARC_TLS_LDM_HI22 : // Local-dynamic
2449 case elfcpp::R_SPARC_TLS_LDM_LO10:
2450 case elfcpp::R_SPARC_TLS_LDM_ADD:
2451 case elfcpp::R_SPARC_TLS_LDM_CALL:
2457 if (r_type == elfcpp::R_SPARC_TLS_LDM_CALL)
2464 case elfcpp::R_SPARC_TLS_LDO_HIX22: // Alternate local-dynamic
2465 case elfcpp::R_SPARC_TLS_LDO_LOX10:
2466 case elfcpp::R_SPARC_TLS_LDO_ADD:
2469 case elfcpp::R_SPARC_TLS_IE_HI22: // Initial-exec
2470 case elfcpp::R_SPARC_TLS_IE_LO10:
2471 case elfcpp::R_SPARC_TLS_IE_LD:
2472 case elfcpp::R_SPARC_TLS_IE_LDX:
2473 case elfcpp::R_SPARC_TLS_IE_ADD:
2480 unsigned int r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
2491 elfcpp::R_SPARC_TLS_TPOFF64 :
2492 elfcpp::R_SPARC_TLS_TPOFF32),
2500 case elfcpp::R_SPARC_TLS_LE_HIX22: // Local-exec
2501 case elfcpp::R_SPARC_TLS_LE_LOX10:
2506 gold_assert(lsym.get_st_type() != elfcpp::STT_SECTION);
2507 unsigned int r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
2520 case elfcpp::R_SPARC_COPY:
2521 case elfcpp::R_SPARC_GLOB_DAT:
2522 case elfcpp::R_SPARC_JMP_SLOT:
2523 case elfcpp::R_SPARC_JMP_IREL:
2524 case elfcpp::R_SPARC_RELATIVE:
2525 case elfcpp::R_SPARC_IRELATIVE:
2526 case elfcpp::R_SPARC_TLS_DTPMOD64:
2527 case elfcpp::R_SPARC_TLS_DTPMOD32:
2528 case elfcpp::R_SPARC_TLS_DTPOFF64:
2529 case elfcpp::R_SPARC_TLS_DTPOFF32:
2530 case elfcpp::R_SPARC_TLS_TPOFF64:
2531 case elfcpp::R_SPARC_TLS_TPOFF32:
2566 const elfcpp::Rela<size, big_endian>& reloc,
2571 bool is_ifunc = gsym->type() == elfcpp::STT_GNU_IFUNC;
2589 case elfcpp::R_SPARC_NONE:
2590 case elfcpp::R_SPARC_REGISTER:
2591 case elfcpp::R_SPARC_GNU_VTINHERIT:
2592 case elfcpp::R_SPARC_GNU_VTENTRY:
2595 case elfcpp::R_SPARC_PLT64:
2596 case elfcpp::R_SPARC_PLT32:
2597 case elfcpp::R_SPARC_HIPLT22:
2598 case elfcpp::R_SPARC_LOPLT10:
2599 case elfcpp::R_SPARC_PCPLT32:
2600 case elfcpp::R_SPARC_PCPLT22:
2601 case elfcpp::R_SPARC_PCPLT10:
2602 case elfcpp::R_SPARC_WPLT30:
2617 case elfcpp::R_SPARC_DISP8:
2618 case elfcpp::R_SPARC_DISP16:
2619 case elfcpp::R_SPARC_DISP32:
2620 case elfcpp::R_SPARC_DISP64:
2621 case elfcpp::R_SPARC_PC_HH22:
2622 case elfcpp::R_SPARC_PC_HM10:
2623 case elfcpp::R_SPARC_PC_LM22:
2624 case elfcpp::R_SPARC_PC10:
2625 case elfcpp::R_SPARC_PC22:
2626 case elfcpp::R_SPARC_WDISP30:
2627 case elfcpp::R_SPARC_WDISP22:
2628 case elfcpp
2629 case elfcpp::R_SPARC_WDISP16:
2630 case elfcpp::R_SPARC_WDISP10:
2656 case elfcpp::R_SPARC_UA64:
2657 case elfcpp::R_SPARC_64:
2658 case elfcpp::R_SPARC_HIX22:
2659 case elfcpp::R_SPARC_LOX10:
2660 case elfcpp::R_SPARC_H34:
2661 case elfcpp::R_SPARC_H44:
2662 case elfcpp::R_SPARC_M44:
2663 case elfcpp::R_SPARC_L44:
2664 case elfcpp::R_SPARC_HH22:
2665 case elfcpp::R_SPARC_HM10:
2666 case elfcpp::R_SPARC_LM22:
2667 case elfcpp::R_SPARC_HI22:
2668 case elfcpp::R_SPARC_LO10:
2669 case elfcpp::R_SPARC_OLO10:
2670 case elfcpp::R_SPARC_UA32:
2671 case elfcpp::R_SPARC_32:
2672 case elfcpp::R_SPARC_UA16:
2673 case elfcpp::R_SPARC_16:
2674 case elfcpp::R_SPARC_11:
2675 case elfcpp::R_SPARC_10:
2676 case elfcpp::R_SPARC_8:
2677 case elfcpp::R_SPARC_7:
2678 case elfcpp::R_SPARC_6:
2679 case elfcpp::R_SPARC_5:
2701 case elfcpp::R_SPARC_16:
2703 orig_r_type = r_type = elfcpp::R_SPARC_UA16;
2705 case elfcpp::R_SPARC_32:
2707 orig_r_type = r_type = elfcpp::R_SPARC_UA32;
2709 case elfcpp::R_SPARC_64:
2711 orig_r_type = r_type = elfcpp::R_SPARC_UA64;
2713 case elfcpp::R_SPARC_UA16:
2715 orig_r_type = r_type = elfcpp::R_SPARC_16;
2717 case elfcpp::R_SPARC_UA32:
2719 orig_r_type = r_type = elfcpp::R_SPARC_32;
2721 case elfcpp::R_SPARC_UA64:
2723 orig_r_type = r_type = elfcpp::R_SPARC_64;
2733 else if (((size == 64 && r_type == elfcpp::R_SPARC_64)
2734 || (size == 32 && r_type == elfcpp::R_SPARC_32))
2735 && gsym->type() == elfcpp::STT_GNU_IFUNC
2747 unsigned int r_type = elfcpp::R_SPARC_IRELATIVE;
2754 else if ((r_type == elfcpp::R_SPARC_32
2755 || r_type == elfcpp::R_SPARC_64)
2759 rela_dyn->add_global_relative(gsym, elfcpp::R_SPARC_RELATIVE,
2787 case elfcpp::R_SPARC_GOTDATA_OP:
2788 case elfcpp::R_SPARC_GOTDATA_OP_HIX22:
2789 case elfcpp::R_SPARC_GOTDATA_OP_LOX10:
2799 case elfcpp::R_SPARC_GOT10:
2800 case elfcpp::R_SPARC_GOT13:
2801 case elfcpp::R_SPARC_GOT22:
2810 if (gsym->type() == elfcpp::STT_GNU_IFUNC)
2819 bool is_ifunc = gsym->type() == elfcpp::STT_GNU_IFUNC;
2837 || (gsym->visibility() == elfcpp::STV_PROTECTED
2839 || (gsym->type() == elfcpp::STT_GNU_IFUNC
2843 unsigned int r_type = elfcpp::R_SPARC_GLOB_DAT;
2868 rela_dyn->add_global_relative(gsym, elfcpp::R_SPARC_RELATIVE,
2877 case elfcpp::R_SPARC_TLS_GD_HI22: // Global-dynamic
2878 case elfcpp::R_SPARC_TLS_GD_LO10:
2879 case elfcpp::R_SPARC_TLS_GD_ADD:
2880 case elfcpp::R_SPARC_TLS_GD_CALL:
2881 case elfcpp::R_SPARC_TLS_LDM_HI22: // Local-dynamic
2882 case elfcpp::R_SPARC_TLS_LDM_LO10:
2883 case elfcpp::R_SPARC_TLS_LDM_ADD:
2884 case elfcpp::R_SPARC_TLS_LDM_CALL:
2885 case elfcpp::R_SPARC_TLS_LDO_HIX22: // Alternate local-dynamic
2886 case elfcpp::R_SPARC_TLS_LDO_LOX10:
2887 case elfcpp::R_SPARC_TLS_LDO_ADD:
2888 case elfcpp::R_SPARC_TLS_LE_HIX22:
2889 case elfcpp::R_SPARC_TLS_LE_LOX10:
2890 case elfcpp::R_SPARC_TLS_IE_HI22: // Initial-exec
2891 case elfcpp::R_SPARC_TLS_IE_LO10:
2892 case elfcpp::R_SPARC_TLS_IE_LD:
2893 case elfcpp::R_SPARC_TLS_IE_LDX:
2894 case elfcpp::R_SPARC_TLS_IE_ADD:
2901 case elfcpp::R_SPARC_TLS_GD_HI22: // Global-dynamic
2902 case elfcpp::R_SPARC_TLS_GD_LO10:
2903 case elfcpp::R_SPARC_TLS_GD_ADD:
2904 case elfcpp::R_SPARC_TLS_GD_CALL:
2914 ? elfcpp::R_SPARC_TLS_DTPMOD64
2915 : elfcpp::R_SPARC_TLS_DTPMOD32),
2917 ? elfcpp::R_SPARC_TLS_DTPOFF64
2918 : elfcpp::R_SPARC_TLS_DTPOFF32));
2921 if (r_type == elfcpp::R_SPARC_TLS_GD_CALL)
2932 elfcpp::R_SPARC_TLS_TPOFF64 :
2933 elfcpp::R_SPARC_TLS_TPOFF32));
2939 case elfcpp::R_SPARC_TLS_LDM_HI22: // Local-dynamic
2940 case elfcpp::R_SPARC_TLS_LDM_LO10:
2941 case elfcpp::R_SPARC_TLS_LDM_ADD:
2942 case elfcpp::R_SPARC_TLS_LDM_CALL:
2948 if (r_type == elfcpp::R_SPARC_TLS_LDM_CALL)
2955 case elfcpp::R_SPARC_TLS_LDO_HIX22: // Alternate local-dynamic
2956 case elfcpp::R_SPARC_TLS_LDO_LOX10:
2957 case elfcpp::R_SPARC_TLS_LDO_ADD:
2960 case elfcpp::R_SPARC_TLS_LE_HIX22:
2961 case elfcpp::R_SPARC_TLS_LE_LOX10:
2973 case elfcpp::R_SPARC_TLS_IE_HI22: // Initial-exec
2974 case elfcpp::R_SPARC_TLS_IE_LO10:
2975 case elfcpp::R_SPARC_TLS_IE_LD:
2976 case elfcpp::R_SPARC_TLS_IE_LDX:
2977 case elfcpp::R_SPARC_TLS_IE_ADD:
2987 ? elfcpp::R_SPARC_TLS_TPOFF64
2988 : elfcpp::R_SPARC_TLS_TPOFF32));
2999 case elfcpp::R_SPARC_COPY:
3000 case elfcpp::R_SPARC_GLOB_DAT:
3001 case elfcpp::R_SPARC_JMP_SLOT:
3002 case elfcpp::R_SPARC_JMP_IREL:
3003 case elfcpp::R_SPARC_RELATIVE:
3004 case elfcpp::R_SPARC_IRELATIVE:
3005 case elfcpp::R_SPARC_TLS_DTPMOD64:
3006 case elfcpp::R_SPARC_TLS_DTPMOD32:
3007 case elfcpp::R_SPARC_TLS_DTPOFF64:
3008 case elfcpp::R_SPARC_TLS_DTPOFF32:
3009 case elfcpp::R_SPARC_TLS_TPOFF64:
3010 case elfcpp::R_SPARC_TLS_TPOFF32:
3041 gold::gc_process_relocs<size, big_endian, Sparc, elfcpp::SHT_RELA, Scan,
3076 if (sh_type == elfcpp::SHT_REL)
3083 gold::scan_relocs<size, big_endian, Sparc, elfcpp::SHT_RELA, Scan>(
3130 elfcpp::PT_LOAD, // segment_type
3131 elfcpp::PF_W, // segment_flags_set
3132 elfcpp::PF(0), // segment_flags_clear
3135 elfcpp::STT_NOTYPE, // type
3136 elfcpp::STB_GLOBAL, // binding
3137 elfcpp::STV_HIDDEN, // visibility
3144 elfcpp::PT_LOAD, // segment_type
3145 elfcpp::PF_W, // segment_flags_set
3146 elfcpp::PF(0), // segment_flags_clear
3149 elfcpp::STT_NOTYPE, // type
3150 elfcpp::STB_GLOBAL, // binding
3151 elfcpp::STV_HIDDEN, // visibility
3172 const elfcpp::Rela<size, big_endian>& rela,
3177 typename elfcpp::Elf_types<size>::Elf_Addr address,
3185 if (r_type != elfcpp::R_SPARC_TLS_GD_ADD)
3209 elfcpp::Elf_Xword value;
3219 unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
3227 const elfcpp::Elf_Xword addend = rela.get_r_addend();
3236 case elfcpp::R_SPARC_GOTDATA_OP:
3237 case elfcpp::R_SPARC_GOTDATA_OP_HIX22:
3238 case elfcpp::R_SPARC_GOTDATA_OP_LOX10:
3251 case elfcpp::R_SPARC_GOT10:
3252 case elfcpp::R_SPARC_GOT13:
3253 case elfcpp::R_SPARC_GOT22:
3261 unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
3273 case elfcpp::R_SPARC_NONE:
3274 case elfcpp::R_SPARC_REGISTER:
3275 case elfcpp::R_SPARC_GNU_VTINHERIT:
3276 case elfcpp::R_SPARC_GNU_VTENTRY:
3279 case elfcpp::R_SPARC_8:
3284 case elfcpp::R_SPARC_16:
3296 case elfcpp::R_SPARC_32:
3311 case elfcpp::R_SPARC_DISP8:
3315 case elfcpp::R_SPARC_DISP16:
3319 case elfcpp::R_SPARC_DISP32:
3323 case elfcpp::R_SPARC_DISP64:
3327 case elfcpp::R_SPARC_WDISP30:
3328 case elfcpp::R_SPARC_WPLT30:
3334 case elfcpp::R_SPARC_WDISP22:
3338 case elfcpp::R_SPARC_WDISP19:
3342 case elfcpp::R_SPARC_WDISP16:
3346 case elfcpp::R_SPARC_WDISP10:
3350 case elfcpp::R_SPARC_HI22:
3354 case elfcpp::R_SPARC_22:
3358 case elfcpp::R_SPARC_13:
3362 case elfcpp::R_SPARC_LO10:
3366 case elfcpp::R_SPARC_GOT10:
3370 case elfcpp::R_SPARC_GOTDATA_OP:
3373 typedef typename elfcpp::Swap<32, true>::Valtype Insntype;
3378 val = elfcpp::Swap<32, true>::readval(wv);
3380 elfcpp::Swap<32, true>::writeval(wv, val);
3384 case elfcpp::R_SPARC_GOTDATA_OP_LOX10:
3391 case elfcpp::R_SPARC_GOT13:
3395 case elfcpp::R_SPARC_GOTDATA_OP_HIX22:
3402 case elfcpp::R_SPARC_GOT22:
3406 case elfcpp::R_SPARC_PC10:
3410 case elfcpp::R_SPARC_PC22:
3414 case elfcpp::R_SPARC_TLS_DTPOFF32:
3415 case elfcpp::R_SPARC_UA32:
3419 case elfcpp::R_SPARC_PLT64:
3424 case elfcpp::R_SPARC_PLT32:
3429 case elfcpp::R_SPARC_HIPLT22:
3433 case elfcpp::R_SPARC_LOPLT10:
3437 case elfcpp::R_SPARC_PCPLT32:
3441 case elfcpp::R_SPARC_PCPLT22:
3445 case elfcpp::R_SPARC_PCPLT10:
3449 case elfcpp::R_SPARC_64:
3464 case elfcpp::R_SPARC_OLO10:
3472 case elfcpp::R_SPARC_HH22:
3476 case elfcpp::R_SPARC_PC_HH22:
3480 case elfcpp::R_SPARC_HM10:
3484 case elfcpp::R_SPARC_PC_HM10:
3488 case elfcpp::R_SPARC_LM22:
3492 case elfcpp::R_SPARC_PC_LM22:
3496 case elfcpp::R_SPARC_11:
3500 case elfcpp::R_SPARC_10:
3504 case elfcpp::R_SPARC_7:
3508 case elfcpp::R_SPARC_6:
3512 case elfcpp::R_SPARC_5:
3516 case elfcpp::R_SPARC_HIX22:
3520 case elfcpp::R_SPARC_LOX10:
3524 case elfcpp::R_SPARC_H34:
3528 case elfcpp::R_SPARC_H44:
3532 case elfcpp::R_SPARC_M44:
3536 case elfcpp::R_SPARC_L44:
3540 case elfcpp::R_SPARC_TLS_DTPOFF64:
3541 case elfcpp::R_SPARC_UA64:
3545 case elfcpp::R_SPARC_UA16:
3549 case elfcpp::R_SPARC_TLS_GD_HI22:
3550 case elfcpp::R_SPARC_TLS_GD_LO10:
3551 case elfcpp::R_SPARC_TLS_GD_ADD:
3552 case elfcpp::R_SPARC_TLS_GD_CALL:
3553 case elfcpp::R_SPARC_TLS_LDM_HI22:
3554 case elfcpp::R_SPARC_TLS_LDM_LO10:
3555 case elfcpp::R_SPARC_TLS_LDM_ADD:
3556 case elfcpp::R_SPARC_TLS_LDM_CALL:
3557 case elfcpp::R_SPARC_TLS_LDO_HIX22:
3558 case elfcpp::R_SPARC_TLS_LDO_LOX10:
3559 case elfcpp::R_SPARC_TLS_LDO_ADD:
3560 case elfcpp::R_SPARC_TLS_IE_HI22:
3561 case elfcpp::R_SPARC_TLS_IE_LO10:
3562 case elfcpp::R_SPARC_TLS_IE_LD:
3563 case elfcpp::R_SPARC_TLS_IE_LDX:
3564 case elfcpp::R_SPARC_TLS_IE_ADD:
3565 case elfcpp::R_SPARC_TLS_LE_HIX22:
3566 case elfcpp::R_SPARC_TLS_LE_LOX10:
3572 case elfcpp::R_SPARC_COPY:
3573 case elfcpp::R_SPARC_GLOB_DAT:
3574 case elfcpp::R_SPARC_JMP_SLOT:
3575 case elfcpp::R_SPARC_JMP_IREL:
3576 case elfcpp::R_SPARC_RELATIVE:
3577 case elfcpp::R_SPARC_IRELATIVE:
3580 case elfcpp::R_SPARC_TLS_DTPMOD64:
3581 case elfcpp::R_SPARC_TLS_DTPMOD32:
3582 case elfcpp::R_SPARC_TLS_TPOFF64:
3583 case elfcpp::R_SPARC_TLS_TPOFF32:
3607 const elfcpp::Rela<size, big_endian>& rela,
3612 typename elfcpp::Elf_types<size>::Elf_Addr address,
3618 typedef typename elfcpp::Swap<32, true>::Valtype Insntype;
3620 const elfcpp::Elf_Xword addend = rela.get_r_addend();
3621 typename elfcpp::Elf_types<size>::Elf_Addr value = psymval->value(object, 0);
3632 case elfcpp::R_SPARC_TLS_GD_HI22:
3633 case elfcpp::R_SPARC_TLS_GD_LO10:
3634 case elfcpp::R_SPARC_TLS_GD_ADD:
3635 case elfcpp::R_SPARC_TLS_GD_CALL:
3645 case elfcpp::R_SPARC_TLS_GD_HI22:
3650 case elfcpp::R_SPARC_TLS_GD_LO10:
3655 case elfcpp::R_SPARC_TLS_GD_ADD:
3657 val = elfcpp::Swap<32, true>::readval(wv);
3659 elfcpp::Swap<32, true>::writeval(wv, val);
3661 case elfcpp::R_SPARC_TLS_GD_CALL:
3663 elfcpp::Swap<32, true>::writeval(wv, sparc_nop);
3680 unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
3691 case elfcpp::R_SPARC_TLS_GD_HI22:
3696 case elfcpp::R_SPARC_TLS_GD_LO10:
3701 case elfcpp::R_SPARC_TLS_GD_ADD:
3703 val = elfcpp::Swap<32, true>::readval(wv);
3710 elfcpp::Swap<32, true>::writeval(wv, val);
3713 case elfcpp::R_SPARC_TLS_GD_CALL:
3722 val = elfcpp::Swap<32, true>::readval(wv + 1);
3731 elfcpp::Swap<32, true>::writeval(wv, val);
3741 elfcpp::Swap<32, true>::writeval(wv, val);
3746 elfcpp::Swap<32, true>::writeval(wv, 0x9001c008);
3755 case elfcpp::R_SPARC_TLS_GD_HI22:
3758 case elfcpp::R_SPARC_TLS_GD_LO10:
3761 case elfcpp::R_SPARC_TLS_GD_ADD:
3763 case elfcpp::R_SPARC_TLS_GD_CALL:
3766 elfcpp::Elf_Xword value;
3786 case elfcpp::R_SPARC_TLS_LDM_HI22:
3787 case elfcpp::R_SPARC_TLS_LDM_LO10:
3788 case elfcpp::R_SPARC_TLS_LDM_ADD:
3789 case elfcpp::R_SPARC_TLS_LDM_CALL:
3796 case elfcpp::R_SPARC_TLS_LDM_HI22:
3797 case elfcpp::R_SPARC_TLS_LDM_LO10:
3798 case elfcpp::R_SPARC_TLS_LDM_ADD:
3799 elfcpp::Swap<32, true>::writeval(wv, sparc_nop);
3802 case elfcpp::R_SPARC_TLS_LDM_CALL:
3803 elfcpp::Swap<32, true>::writeval(wv, sparc_mov_g0_o0);
3817 case elfcpp::R_SPARC_TLS_LDM_HI22:
3820 case elfcpp::R_SPARC_TLS_LDM_LO10:
3823 case elfcpp::R_SPARC_TLS_LDM_ADD:
3825 case elfcpp::R_SPARC_TLS_LDM_CALL:
3828 elfcpp::Elf_Xword value;
3850 case elfcpp::R_SPARC_TLS_LDO_HIX22:
3859 case elfcpp::R_SPARC_TLS_LDO_LOX10:
3868 case elfcpp::R_SPARC_TLS_LDO_ADD:
3875 val = elfcpp::Swap<32, true>::readval(wv);
3877 elfcpp::Swap<32, true>::writeval(wv, val);
3885 case elfcpp::R_SPARC_TLS_IE_LD:
3886 case elfcpp::R_SPARC_TLS_IE_LDX:
3890 Insntype val = elfcpp::Swap<32, true>::readval(wv);
3899 elfcpp::Swap<32, true>::writeval(wv, val);
3903 case elfcpp::R_SPARC_TLS_IE_HI22:
3904 case elfcpp::R_SPARC_TLS_IE_LO10:
3910 case elfcpp::R_SPARC_TLS_IE_HI22:
3914 case elfcpp::R_SPARC_TLS_IE_LO10:
3932 unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
3940 case elfcpp::R_SPARC_TLS_IE_HI22:
3943 case elfcpp::R_SPARC_TLS_IE_LO10:
3954 case elfcpp::R_SPARC_TLS_IE_ADD:
3960 case elfcpp::R_SPARC_TLS_LE_HIX22:
3970 case elfcpp::R_SPARC_TLS_LE_LOX10:
3989 const elfcpp::Rela<size, big_endian>& rela,
3992 typedef typename elfcpp::Swap<32, true>::Valtype Insntype;
4026 call_insn = elfcpp::Swap<32, true>::readval(wv);
4027 delay_insn = elfcpp::Swap<32, true>::readval(wv + 1);
4080 if ((size == 64 || target->elf_machine_ == elfcpp::EM_SPARC32PLUS)
4092 elfcpp::Swap<32, true>::writeval(wv, call_insn);
4111 set_insn = elfcpp::Swap<32, true>::readval(wv - 1);
4122 elfcpp::Swap<32, true>::writeval(wv + 1, sparc_nop);
4138 typename elfcpp::Elf_types<size>::Elf_Addr address,
4145 gold_assert(sh_type == elfcpp::SHT_RELA);
4147 gold::relocate_section<size, big_endian, Sparc, elfcpp::SHT_RELA,
4193 gold_assert(sh_type == elfcpp::SHT_RELA);
4195 typedef gold::Default_scan_relocatable_relocs<elfcpp::SHT_RELA,
4198 gold::scan_relocatable_relocs<size, big_endian, elfcpp::SHT_RELA,
4223 typename elfcpp::Elf_types<size>::Elf_Off offset_in_output_section,
4226 typename elfcpp::Elf_types<size>::Elf_Addr view_address,
4231 gold_assert(sh_type == elfcpp::SHT_RELA);
4233 gold::relocate_relocs<size, big_endian, elfcpp::SHT_RELA>(
4270 off_t offset, const elfcpp::Ehdr<size, big_endian>& ehdr)
4272 elfcpp::Elf_Half machine = ehdr.get_e_machine();
4273 elfcpp::Elf_Word flags = ehdr.get_e_flags();
4274 elfcpp::Elf_Word omm, mm;
4278 case elfcpp::EM_SPARC32PLUS:
4279 this->elf_machine_ = elfcpp::EM_SPARC32PLUS;
4282 case elfcpp::EM_SPARC:
4283 case elfcpp::EM_SPARCV9:
4298 this->elf_flags_ |= (flags & (elfcpp::EF_SPARC_32PLUS
4299 | elfcpp::EF_SPARC_SUN_US1
4300 | elfcpp::EF_SPARC_HAL_R1
4301 | elfcpp::EF_SPARC_SUN_US3));
4305 omm = (this->elf_flags_ & elfcpp::EF_SPARCV9_MM);
4306 mm = (flags & elfcpp::EF_SPARCV9_MM);
4309 if (mm == elfcpp::EF_SPARCV9_TSO)
4311 this->elf_flags_ &= ~elfcpp::EF_SPARCV9_MM;
4312 this->elf_flags_ |= elfcpp::EF_SPARCV9_TSO;
4314 else if (mm == elfcpp::EF_SPARCV9_PSO
4315 && omm == elfcpp::EF_SPARCV9_RMO)
4317 this->elf_flags_ &= ~elfcpp::EF_SPARCV9_MM;
4318 this->elf_flags_ |= elfcpp::EF_SPARCV9_PSO;
4325 if (!(flags & elfcpp::EF_SPARC_LEDATA) != big_endian)
4346 elfcpp::Ehdr_write<size, big_endian> oehdr(view);
4361 : Target_selector(elfcpp::EM_NONE, size, big_endian,
4372 if (machine != elfcpp::EM_SPARCV9)
4377 if (machine != elfcpp::EM_SPARC
4378 && machine != elfcpp::EM_SPARC32PLUS)