Lines Matching refs:arsp

855 tls_fixups(Ofl_desc *ofl, Rel_desc *arsp)  in tls_fixups()  argument
857 Sym_desc *sdp = arsp->rel_sym; in tls_fixups()
858 Word rtype = arsp->rel_rtype; in tls_fixups()
860 int bswap = OFL_SWAP_RELOC_DATA(ofl, arsp); in tls_fixups()
863 offset = (Word *)((uintptr_t)arsp->rel_roffset + in tls_fixups()
864 (uintptr_t)_elf_getxoff(arsp->rel_isdesc->is_indata) + in tls_fixups()
865 (uintptr_t)RELAUX_GET_OSDESC(arsp)->os_outdata->d_buf); in tls_fixups()
874 R_SPARC_TLS_IE_HI22, arsp, in tls_fixups()
876 arsp->rel_rtype = R_SPARC_TLS_IE_HI22; in tls_fixups()
881 R_SPARC_TLS_IE_LO10, arsp, in tls_fixups()
883 arsp->rel_rtype = R_SPARC_TLS_IE_LO10; in tls_fixups()
888 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
897 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
914 R_SPARC_TLS_LE_HIX22, arsp, ld_reloc_sym_name)); in tls_fixups()
915 arsp->rel_rtype = R_SPARC_TLS_LE_HIX22; in tls_fixups()
920 R_SPARC_TLS_LE_LOX10, arsp, ld_reloc_sym_name)); in tls_fixups()
921 arsp->rel_rtype = R_SPARC_TLS_LE_LOX10; in tls_fixups()
938 R_SPARC_TLS_LE_LOX10, arsp, ld_reloc_sym_name)); in tls_fixups()
943 arsp->rel_rtype = R_SPARC_TLS_LE_LOX10; in tls_fixups()
957 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
975 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
984 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
996 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
1008 gotop_fixups(Ofl_desc *ofl, Rel_desc *arsp) in gotop_fixups() argument
1010 Word rtype = arsp->rel_rtype; in gotop_fixups()
1019 R_SPARC_GOTDATA_HIX22, arsp, ld_reloc_sym_name)); in gotop_fixups()
1020 arsp->rel_rtype = R_SPARC_GOTDATA_HIX22; in gotop_fixups()
1025 R_SPARC_GOTDATA_LOX10, arsp, ld_reloc_sym_name)); in gotop_fixups()
1026 arsp->rel_rtype = R_SPARC_GOTDATA_LOX10; in gotop_fixups()
1039 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in gotop_fixups()
1040 offset = (Word *)(uintptr_t)(arsp->rel_roffset + in gotop_fixups()
1041 _elf_getxoff(arsp->rel_isdesc->is_indata) + in gotop_fixups()
1042 (uintptr_t)RELAUX_GET_OSDESC(arsp)->os_outdata->d_buf); in gotop_fixups()
1043 bswap = OFL_SWAP_RELOC_DATA(ofl, arsp); in gotop_fixups()
1053 if (arsp->rel_isdesc->is_file) in gotop_fixups()
1054 ifl_name = arsp->rel_isdesc->is_file->ifl_name; in gotop_fixups()
1059 conv_reloc_SPARC_type(arsp->rel_rtype, 0, &inv_buf), in gotop_fixups()
1060 ifl_name, ld_reloc_sym_name(arsp)); in gotop_fixups()
1069 Rel_desc *arsp; in ld_do_activerelocs() local
1081 REL_CACHE_TRAVERSE(&ofl->ofl_actrels, idx, rcbp, arsp) { in ld_do_activerelocs()
1093 if ((arsp->rel_isdesc->is_flags & FLG_IS_DISCARD) && in ld_do_activerelocs()
1094 ((arsp->rel_flags & (FLG_REL_GOT | FLG_REL_BSS | in ld_do_activerelocs()
1096 DBG_CALL(Dbg_reloc_discard(ofl->ofl_lml, M_MACH, arsp)); in ld_do_activerelocs()
1103 if (arsp->rel_flags & FLG_REL_TLSFIX) { in ld_do_activerelocs()
1106 if ((ret = tls_fixups(ofl, arsp)) == FIX_ERROR) in ld_do_activerelocs()
1115 if (arsp->rel_flags & FLG_REL_GOTFIX) { in ld_do_activerelocs()
1118 if ((ret = gotop_fixups(ofl, arsp)) == FIX_ERROR) in ld_do_activerelocs()
1128 if (RELAUX_GET_MOVE(arsp)) in ld_do_activerelocs()
1129 ld_adj_movereloc(ofl, arsp); in ld_do_activerelocs()
1131 sdp = arsp->rel_sym; in ld_do_activerelocs()
1132 refaddr = arsp->rel_roffset + in ld_do_activerelocs()
1133 (Off)_elf_getxoff(arsp->rel_isdesc->is_indata); in ld_do_activerelocs()
1135 if ((arsp->rel_flags & FLG_REL_CLVAL) || in ld_do_activerelocs()
1136 (arsp->rel_flags & FLG_REL_GOTCL)) in ld_do_activerelocs()
1146 (sym = ld_am_I_partial(arsp, arsp->rel_raddend))) { in ld_do_activerelocs()
1166 arsp->rel_raddend -= sym->sd_osym->st_value; in ld_do_activerelocs()
1177 } else if (IS_SIZE(arsp->rel_rtype)) { in ld_do_activerelocs()
1199 if ((arsp->rel_flags & FLG_REL_GOT) && in ld_do_activerelocs()
1200 !ld_reloc_set_aux_osdesc(ofl, arsp, ofl->ofl_osgot)) in ld_do_activerelocs()
1202 osp = RELAUX_GET_OSDESC(arsp); in ld_do_activerelocs()
1208 if ((arsp->rel_flags & FLG_REL_LOAD) && in ld_do_activerelocs()
1211 arsp->rel_isdesc->is_osdesc->os_shdr->sh_addr; in ld_do_activerelocs()
1217 if (IS_PLT(arsp->rel_rtype)) { in ld_do_activerelocs()
1226 value += arsp->rel_raddend; in ld_do_activerelocs()
1227 if (IS_EXTOFFSET(arsp->rel_rtype)) in ld_do_activerelocs()
1228 value += RELAUX_GET_TYPEDATA(arsp); in ld_do_activerelocs()
1238 if ((arsp->rel_flags & FLG_REL_GOT) && in ld_do_activerelocs()
1254 if (arsp->rel_flags & FLG_REL_DTLS) in ld_do_activerelocs()
1256 else if (arsp->rel_flags & FLG_REL_MTLS) in ld_do_activerelocs()
1258 else if (arsp->rel_flags & FLG_REL_STLS) in ld_do_activerelocs()
1263 gnp = ld_find_got_ndx(sdp->sd_GOTndxs, gref, ofl, arsp); in ld_do_activerelocs()
1266 if (arsp->rel_rtype == M_R_DTPOFF) in ld_do_activerelocs()
1282 arsp, R1addr, value, ld_reloc_sym_name)); in ld_do_activerelocs()
1293 } else if (IS_GOT_BASED(arsp->rel_rtype) && in ld_do_activerelocs()
1298 } else if (IS_PC_RELATIVE(arsp->rel_rtype)) { in ld_do_activerelocs()
1301 } else if (IS_TLS_INS(arsp->rel_rtype) && in ld_do_activerelocs()
1302 IS_GOT_RELATIVE(arsp->rel_rtype) && in ld_do_activerelocs()
1307 if (arsp->rel_flags & FLG_REL_STLS) in ld_do_activerelocs()
1309 else if (arsp->rel_flags & FLG_REL_DTLS) in ld_do_activerelocs()
1311 else if (arsp->rel_flags & FLG_REL_MTLS) in ld_do_activerelocs()
1314 gnp = ld_find_got_ndx(sdp->sd_GOTndxs, gref, ofl, arsp); in ld_do_activerelocs()
1319 } else if (IS_GOT_RELATIVE(arsp->rel_rtype) && in ld_do_activerelocs()
1324 GOT_REF_GENERIC, ofl, arsp); in ld_do_activerelocs()
1329 } else if ((arsp->rel_flags & FLG_REL_STLS) && in ld_do_activerelocs()
1343 if (arsp->rel_isdesc->is_file) in ld_do_activerelocs()
1344 ifl_name = arsp->rel_isdesc->is_file->ifl_name; in ld_do_activerelocs()
1355 if (arsp->rel_isdesc->is_indata->d_buf == 0) { in ld_do_activerelocs()
1359 conv_reloc_SPARC_type(arsp->rel_rtype, 0, &inv_buf), in ld_do_activerelocs()
1360 ifl_name, ld_reloc_sym_name(arsp), in ld_do_activerelocs()
1361 EC_WORD(arsp->rel_isdesc->is_scnndx), in ld_do_activerelocs()
1362 arsp->rel_isdesc->is_name); in ld_do_activerelocs()
1369 addr = (uchar_t *)((uintptr_t)arsp->rel_roffset + in ld_do_activerelocs()
1370 (uintptr_t)_elf_getxoff(arsp->rel_isdesc->is_indata)); in ld_do_activerelocs()
1373 M_MACH, SHT_RELA, arsp, EC_NATPTR(addr), value, in ld_do_activerelocs()
1378 ofl->ofl_size) || (arsp->rel_roffset > in ld_do_activerelocs()
1390 conv_reloc_SPARC_type(arsp->rel_rtype, 0, &inv_buf), in ld_do_activerelocs()
1391 ifl_name, EC_WORD(arsp->rel_isdesc->is_scnndx), in ld_do_activerelocs()
1392 arsp->rel_isdesc->is_name, ld_reloc_sym_name(arsp), in ld_do_activerelocs()
1406 if (do_reloc_ld(arsp, addr, &value, ld_reloc_sym_name, in ld_do_activerelocs()
1407 ifl_name, OFL_SWAP_RELOC_DATA(ofl, arsp), in ld_do_activerelocs()