Lines Matching refs:arsp
835 tls_fixups(Ofl_desc *ofl, Rel_desc *arsp) in tls_fixups() argument
837 Sym_desc *sdp = arsp->rel_sym; in tls_fixups()
838 Word rtype = arsp->rel_rtype; in tls_fixups()
840 int bswap = OFL_SWAP_RELOC_DATA(ofl, arsp); in tls_fixups()
843 offset = (Word *)((uintptr_t)arsp->rel_roffset + in tls_fixups()
844 (uintptr_t)_elf_getxoff(arsp->rel_isdesc->is_indata) + in tls_fixups()
845 (uintptr_t)RELAUX_GET_OSDESC(arsp)->os_outdata->d_buf); in tls_fixups()
854 R_SPARC_TLS_IE_HI22, arsp, in tls_fixups()
856 arsp->rel_rtype = R_SPARC_TLS_IE_HI22; in tls_fixups()
861 R_SPARC_TLS_IE_LO10, arsp, in tls_fixups()
863 arsp->rel_rtype = R_SPARC_TLS_IE_LO10; in tls_fixups()
868 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
877 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
894 R_SPARC_TLS_LE_HIX22, arsp, ld_reloc_sym_name)); in tls_fixups()
895 arsp->rel_rtype = R_SPARC_TLS_LE_HIX22; in tls_fixups()
900 R_SPARC_TLS_LE_LOX10, arsp, ld_reloc_sym_name)); in tls_fixups()
901 arsp->rel_rtype = R_SPARC_TLS_LE_LOX10; in tls_fixups()
918 R_SPARC_TLS_LE_LOX10, arsp, ld_reloc_sym_name)); in tls_fixups()
923 arsp->rel_rtype = R_SPARC_TLS_LE_LOX10; in tls_fixups()
937 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
955 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
964 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
976 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in tls_fixups()
988 gotop_fixups(Ofl_desc *ofl, Rel_desc *arsp) in gotop_fixups() argument
990 Word rtype = arsp->rel_rtype; in gotop_fixups()
999 R_SPARC_GOTDATA_HIX22, arsp, ld_reloc_sym_name)); in gotop_fixups()
1000 arsp->rel_rtype = R_SPARC_GOTDATA_HIX22; in gotop_fixups()
1005 R_SPARC_GOTDATA_LOX10, arsp, ld_reloc_sym_name)); in gotop_fixups()
1006 arsp->rel_rtype = R_SPARC_GOTDATA_LOX10; in gotop_fixups()
1019 R_SPARC_NONE, arsp, ld_reloc_sym_name)); in gotop_fixups()
1020 offset = (Word *)(uintptr_t)(arsp->rel_roffset + in gotop_fixups()
1021 _elf_getxoff(arsp->rel_isdesc->is_indata) + in gotop_fixups()
1022 (uintptr_t)RELAUX_GET_OSDESC(arsp)->os_outdata->d_buf); in gotop_fixups()
1023 bswap = OFL_SWAP_RELOC_DATA(ofl, arsp); in gotop_fixups()
1033 if (arsp->rel_isdesc->is_file) in gotop_fixups()
1034 ifl_name = arsp->rel_isdesc->is_file->ifl_name; in gotop_fixups()
1039 conv_reloc_SPARC_type(arsp->rel_rtype, 0, &inv_buf), in gotop_fixups()
1040 ifl_name, ld_reloc_sym_name(arsp)); in gotop_fixups()
1049 Rel_desc *arsp; in ld_do_activerelocs() local
1061 REL_CACHE_TRAVERSE(&ofl->ofl_actrels, idx, rcbp, arsp) { in ld_do_activerelocs()
1073 if ((arsp->rel_isdesc->is_flags & FLG_IS_DISCARD) && in ld_do_activerelocs()
1074 ((arsp->rel_flags & (FLG_REL_GOT | FLG_REL_BSS | in ld_do_activerelocs()
1076 DBG_CALL(Dbg_reloc_discard(ofl->ofl_lml, M_MACH, arsp)); in ld_do_activerelocs()
1083 if (arsp->rel_flags & FLG_REL_TLSFIX) { in ld_do_activerelocs()
1086 if ((ret = tls_fixups(ofl, arsp)) == FIX_ERROR) in ld_do_activerelocs()
1095 if (arsp->rel_flags & FLG_REL_GOTFIX) { in ld_do_activerelocs()
1098 if ((ret = gotop_fixups(ofl, arsp)) == FIX_ERROR) in ld_do_activerelocs()
1108 if (RELAUX_GET_MOVE(arsp)) in ld_do_activerelocs()
1109 ld_adj_movereloc(ofl, arsp); in ld_do_activerelocs()
1111 sdp = arsp->rel_sym; in ld_do_activerelocs()
1112 refaddr = arsp->rel_roffset + in ld_do_activerelocs()
1113 (Off)_elf_getxoff(arsp->rel_isdesc->is_indata); in ld_do_activerelocs()
1115 if ((arsp->rel_flags & FLG_REL_CLVAL) || in ld_do_activerelocs()
1116 (arsp->rel_flags & FLG_REL_GOTCL)) in ld_do_activerelocs()
1126 (sym = ld_am_I_partial(arsp, arsp->rel_raddend))) { in ld_do_activerelocs()
1146 arsp->rel_raddend -= sym->sd_osym->st_value; in ld_do_activerelocs()
1157 } else if (IS_SIZE(arsp->rel_rtype)) { in ld_do_activerelocs()
1179 if ((arsp->rel_flags & FLG_REL_GOT) && in ld_do_activerelocs()
1180 !ld_reloc_set_aux_osdesc(ofl, arsp, ofl->ofl_osgot)) in ld_do_activerelocs()
1182 osp = RELAUX_GET_OSDESC(arsp); in ld_do_activerelocs()
1188 if ((arsp->rel_flags & FLG_REL_LOAD) && in ld_do_activerelocs()
1191 arsp->rel_isdesc->is_osdesc->os_shdr->sh_addr; in ld_do_activerelocs()
1197 if (IS_PLT(arsp->rel_rtype)) { in ld_do_activerelocs()
1206 value += arsp->rel_raddend; in ld_do_activerelocs()
1207 if (IS_EXTOFFSET(arsp->rel_rtype)) in ld_do_activerelocs()
1208 value += RELAUX_GET_TYPEDATA(arsp); in ld_do_activerelocs()
1218 if ((arsp->rel_flags & FLG_REL_GOT) && in ld_do_activerelocs()
1234 if (arsp->rel_flags & FLG_REL_DTLS) in ld_do_activerelocs()
1236 else if (arsp->rel_flags & FLG_REL_MTLS) in ld_do_activerelocs()
1238 else if (arsp->rel_flags & FLG_REL_STLS) in ld_do_activerelocs()
1243 gnp = ld_find_got_ndx(sdp->sd_GOTndxs, gref, ofl, arsp); in ld_do_activerelocs()
1246 if (arsp->rel_rtype == M_R_DTPOFF) in ld_do_activerelocs()
1262 arsp, R1addr, value, ld_reloc_sym_name)); in ld_do_activerelocs()
1273 } else if (IS_GOT_BASED(arsp->rel_rtype) && in ld_do_activerelocs()
1278 } else if (IS_PC_RELATIVE(arsp->rel_rtype)) { in ld_do_activerelocs()
1281 } else if (IS_TLS_INS(arsp->rel_rtype) && in ld_do_activerelocs()
1282 IS_GOT_RELATIVE(arsp->rel_rtype) && in ld_do_activerelocs()
1287 if (arsp->rel_flags & FLG_REL_STLS) in ld_do_activerelocs()
1289 else if (arsp->rel_flags & FLG_REL_DTLS) in ld_do_activerelocs()
1291 else if (arsp->rel_flags & FLG_REL_MTLS) in ld_do_activerelocs()
1294 gnp = ld_find_got_ndx(sdp->sd_GOTndxs, gref, ofl, arsp); in ld_do_activerelocs()
1299 } else if (IS_GOT_RELATIVE(arsp->rel_rtype) && in ld_do_activerelocs()
1304 GOT_REF_GENERIC, ofl, arsp); in ld_do_activerelocs()
1309 } else if ((arsp->rel_flags & FLG_REL_STLS) && in ld_do_activerelocs()
1323 if (arsp->rel_isdesc->is_file) in ld_do_activerelocs()
1324 ifl_name = arsp->rel_isdesc->is_file->ifl_name; in ld_do_activerelocs()
1335 if (arsp->rel_isdesc->is_indata->d_buf == 0) { in ld_do_activerelocs()
1339 conv_reloc_SPARC_type(arsp->rel_rtype, 0, &inv_buf), in ld_do_activerelocs()
1340 ifl_name, ld_reloc_sym_name(arsp), in ld_do_activerelocs()
1341 EC_WORD(arsp->rel_isdesc->is_scnndx), in ld_do_activerelocs()
1342 arsp->rel_isdesc->is_name); in ld_do_activerelocs()
1349 addr = (uchar_t *)((uintptr_t)arsp->rel_roffset + in ld_do_activerelocs()
1350 (uintptr_t)_elf_getxoff(arsp->rel_isdesc->is_indata)); in ld_do_activerelocs()
1353 M_MACH, SHT_RELA, arsp, EC_NATPTR(addr), value, in ld_do_activerelocs()
1358 ofl->ofl_size) || (arsp->rel_roffset > in ld_do_activerelocs()
1370 conv_reloc_SPARC_type(arsp->rel_rtype, 0, &inv_buf), in ld_do_activerelocs()
1371 ifl_name, EC_WORD(arsp->rel_isdesc->is_scnndx), in ld_do_activerelocs()
1372 arsp->rel_isdesc->is_name, ld_reloc_sym_name(arsp), in ld_do_activerelocs()
1386 if (do_reloc_ld(arsp, addr, &value, ld_reloc_sym_name, in ld_do_activerelocs()
1387 ifl_name, OFL_SWAP_RELOC_DATA(ofl, arsp), in ld_do_activerelocs()