/freebsd/cddl/contrib/opensolaris/common/ctf/ |
H A D | ctf_lookup.c | 182 ctf_lookup_by_symbol(ctf_file_t *fp, ulong_t symidx) in ctf_lookup_by_symbol() argument 190 if (symidx >= fp->ctf_nsyms) in ctf_lookup_by_symbol() 194 const Elf32_Sym *symp = (Elf32_Sym *)sp->cts_data + symidx; in ctf_lookup_by_symbol() 198 const Elf64_Sym *symp = (Elf64_Sym *)sp->cts_data + symidx; in ctf_lookup_by_symbol() 203 if (fp->ctf_sxlate[symidx] == -1u) in ctf_lookup_by_symbol() 206 type = *(uint_t *)((uintptr_t)fp->ctf_buf + fp->ctf_sxlate[symidx]); in ctf_lookup_by_symbol() 250 ctf_func_info(ctf_file_t *fp, ulong_t symidx, ctf_funcinfo_t *fip) in ctf_func_info() argument 259 if (symidx >= fp->ctf_nsyms) in ctf_func_info() 263 const Elf32_Sym *symp = (Elf32_Sym *)sp->cts_data + symidx; in ctf_func_info() 267 const Elf64_Sym *symp = (Elf64_Sym *)sp->cts_data + symidx; in ctf_func_info() [all …]
|
/freebsd/lib/libkldelf/ |
H A D | ef_amd64.c | 49 GElf_Size rtype, symidx; in ef_amd64_reloc() local 59 symidx = GELF_R_SYM(rel->r_info); in ef_amd64_reloc() 66 symidx = GELF_R_SYM(rela->r_info); in ef_amd64_reloc() 92 addr = EF_SYMADDR(ef, symidx) + addend; in ef_amd64_reloc() 96 addr = EF_SYMADDR(ef, symidx) + addend; in ef_amd64_reloc() 100 addr = EF_SYMADDR(ef, symidx); in ef_amd64_reloc()
|
H A D | ef_i386.c | 49 GElf_Size rtype, symidx; in ef_i386_reloc() local 59 symidx = GELF_R_SYM(rel->r_info); in ef_i386_reloc() 66 symidx = GELF_R_SYM(rela->r_info); in ef_i386_reloc() 84 addr = EF_SYMADDR(ef, symidx) + addend; in ef_i386_reloc() 88 addr = EF_SYMADDR(ef, symidx); in ef_i386_reloc()
|
H A D | ef_mips.c | 52 GElf_Size rtype, symidx; in ef_mips_reloc() local 62 symidx = GELF_R_SYM(rel->r_info); in ef_mips_reloc() 69 symidx = GELF_R_SYM(rela->r_info); in ef_mips_reloc() 94 addr = EF_SYMADDR(ef, symidx) + addend; in ef_mips_reloc() 101 addr = EF_SYMADDR(ef, symidx) + addend; in ef_mips_reloc()
|
H A D | ef_arm.c | 50 GElf_Size rtype, symidx; in ef_arm_reloc() local 60 symidx = GELF_R_SYM(rel->r_info); in ef_arm_reloc() 67 symidx = GELF_R_SYM(rela->r_info); in ef_arm_reloc() 81 addr = EF_SYMADDR(ef, symidx) + addend; in ef_arm_reloc()
|
H A D | ef_powerpc.c | 49 GElf_Size rtype, symidx; in ef_ppc_reloc() local 58 symidx = GELF_R_SYM(rela->r_info); in ef_ppc_reloc() 79 addr = EF_SYMADDR(ef, symidx) + addend; in ef_ppc_reloc() 83 addr = EF_SYMADDR(ef, symidx) + addend; in ef_ppc_reloc()
|
H A D | ef_riscv.c | 52 GElf_Size rtype, symidx; in ef_riscv_reloc() local 61 symidx = GELF_R_SYM(rela->r_info); in ef_riscv_reloc() 72 addr = EF_SYMADDR(ef, symidx) + addend; in ef_riscv_reloc()
|
H A D | ef_aarch64.c | 47 GElf_Size rtype, symidx; in ef_aarch64_reloc() local 56 symidx = GELF_R_SYM(rela->r_info); in ef_aarch64_reloc() 71 addr = EF_SYMADDR(ef, symidx) + addend; in ef_aarch64_reloc()
|
H A D | kldelf.h | 47 #define EF_SYMADDR(ef, symidx) \ argument 48 (ef)->ef_ops->symaddr((ef)->ef_ef, symidx) 69 GElf_Addr (*symaddr)(elf_file_t ef, GElf_Size symidx);
|
H A D | ef_obj.c | 100 static GElf_Addr ef_obj_symaddr(elf_file_t ef, GElf_Size symidx); 172 ef_obj_symaddr(elf_file_t ef, GElf_Size symidx) in ef_obj_symaddr() argument 176 if (symidx >= ef->ddbsymcnt) in ef_obj_symaddr() 178 sym = ef->ddbsymtab + symidx; in ef_obj_symaddr()
|
H A D | ef.c | 80 static GElf_Addr ef_symaddr(elf_file_t ef, GElf_Size symidx); 210 ef_symaddr(elf_file_t ef, GElf_Size symidx) in ef_symaddr() argument 214 if (symidx >= ef->ef_nchains) in ef_symaddr() 216 sym = ef->ef_symtab + symidx; in ef_symaddr()
|
/freebsd/stand/common/ |
H A D | reloc_elf.c | 57 Elf_Size symidx; in __elfN() local 70 symidx = ELF_R_SYM(rel->r_info); in __elfN() 81 symidx = ELF_R_SYM(rela->r_info); in __elfN() 118 addr = symaddr(ef, symidx); in __elfN() 133 Elf_Size rtype, symidx; in __elfN() 144 symidx = ELF_R_SYM(rel->r_info); in __elfN() 153 symidx = ELF_R_SYM(rela->r_info); in __elfN() 177 addr = symaddr(ef, symidx); in __elfN()
|
H A D | load_elf_obj.c | 78 static Elf_Addr __elfN(obj_symaddr)(struct elf_file *ef, Elf_Size symidx); 565 __elfN(obj_symaddr)(struct elf_file *ef, Elf_Size symidx) in __elfN() 570 if (symidx >= ef->e_shdr[ef->symtabindex].sh_size / sizeof(Elf_Sym)) in __elfN() 572 COPYOUT(ef->e_shdr[ef->symtabindex].sh_addr + symidx * sizeof(Elf_Sym), in __elfN()
|
/freebsd/sys/riscv/riscv/ |
H A D | elf_machdep.c | 293 Elf_Size rtype, symidx; in elf_reloc_internal() local 312 symidx = ELF_R_SYM(rela->r_info); in elf_reloc_internal() 325 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 338 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 360 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 387 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 412 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 428 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 443 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 459 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() [all …]
|
/freebsd/sys/i386/i386/ |
H A D | elf_machdep.c | 179 Elf_Word rtype, symidx; in elf_reloc_internal() local 190 symidx = ELF_R_SYM(rel->r_info); in elf_reloc_internal() 197 symidx = ELF_R_SYM(rela->r_info); in elf_reloc_internal() 217 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 226 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 240 "symbol index %d\n", symidx); in elf_reloc_internal() 246 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 265 "symbol index %d\n", rtype, symidx); in elf_reloc_internal()
|
/freebsd/sys/arm/arm/ |
H A D | elf_machdep.c | 190 Elf_Word rtype, symidx; in elf_reloc_internal() local 201 symidx = ELF_R_SYM(rel->r_info); in elf_reloc_internal() 208 symidx = ELF_R_SYM(rela->r_info); in elf_reloc_internal() 228 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 240 "symbol index %d\n", symidx); in elf_reloc_internal() 245 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 256 "symbol index %d\n", rtype, symidx); in elf_reloc_internal()
|
/freebsd/sys/amd64/amd64/ |
H A D | elf_machdep.c | 283 Elf_Size rtype, symidx; in elf_reloc_internal() local 293 symidx = ELF_R_SYM(rel->r_info); in elf_reloc_internal() 311 symidx = ELF_R_SYM(rela->r_info); in elf_reloc_internal() 329 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 340 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 350 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 365 "symbol index %ld\n", symidx); in elf_reloc_internal() 370 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 393 "symbol index %ld\n", rtype, symidx); in elf_reloc_internal()
|
/freebsd/sys/arm64/arm64/ |
H A D | elf_machdep.c | 184 Elf_Word rtype, symidx; in elf_reloc_internal() local 195 symidx = ELF_R_SYM(rel->r_info); in elf_reloc_internal() 202 symidx = ELF_R_SYM(rela->r_info); in elf_reloc_internal() 227 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 234 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 242 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 251 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 264 "symbol index %d\n", rtype, symidx); in elf_reloc_internal()
|
/freebsd/sys/powerpc/powerpc/ |
H A D | elf32_machdep.c | 243 Elf_Word rtype, symidx; in elf_reloc_internal() local 257 symidx = ELF_R_SYM(rela->r_info); in elf_reloc_internal() 268 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 275 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 290 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 317 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 332 "symbol index %d\n", (int)rtype, symidx); in elf_reloc_internal()
|
H A D | elf64_machdep.c | 330 Elf_Word rtype, symidx; in elf_reloc_internal() local 343 symidx = ELF_R_SYM(rela->r_info); in elf_reloc_internal() 354 error = lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 366 lookup(lf, symidx, 1, &addr); in elf_reloc_internal() 384 "symbol index %d\n", (int)rtype, symidx); in elf_reloc_internal()
|
/freebsd/sys/kern/ |
H A D | link_elf_obj.c | 158 static int elf_obj_lookup(linker_file_t lf, Elf_Size symidx, int deps, 1376 Elf_Size symidx; in relocate_file1() local 1393 symidx = ELF_R_SYM(rel->r_info); in relocate_file1() 1394 if (symidx >= ef->ddbsymcnt) in relocate_file1() 1396 sym = ef->ddbsymtab + symidx; in relocate_file1() 1428 symidx = ELF_R_SYM(rela->r_info); in relocate_file1() 1429 if (symidx >= ef->ddbsymcnt) in relocate_file1() 1431 sym = ef->ddbsymtab + symidx; in relocate_file1() 1692 elf_obj_lookup(linker_file_t lf, Elf_Size symidx, int deps, Elf_Addr *res) in elf_obj_lookup() argument 1700 if (symidx >= ef->ddbsymcnt) { in elf_obj_lookup() [all …]
|
H A D | link_elf.c | 1834 elf_get_sym(linker_file_t lf, Elf_Size symidx) in elf_get_sym() argument 1838 if (symidx >= ef->nchains) in elf_get_sym() 1840 return (ef->symtab + symidx); in elf_get_sym() 1844 elf_get_symname(linker_file_t lf, Elf_Size symidx) in elf_get_symname() argument 1849 if (symidx >= ef->nchains) in elf_get_symname() 1851 sym = ef->symtab + symidx; in elf_get_symname() 1863 elf_lookup(linker_file_t lf, Elf_Size symidx, int deps, Elf_Addr *res) in elf_lookup() argument 1871 if (symidx >= ef->nchains) { in elf_lookup() 1876 sym = ef->symtab + symidx; in elf_lookup() 2001 elf_lookup_ifunc(linker_file_t lf, Elf_Size symidx, int deps __unused, in elf_lookup_ifunc() argument [all …]
|
/freebsd/cddl/contrib/opensolaris/tools/ctf/dump/ |
H A D | dump.c | 237 next_sym(const ctf_data_t *cd, const int symidx, const uchar_t matchtype, in next_sym() argument 242 for (i = symidx + 1; i < cd->cd_nsyms; i++) { in next_sym() 286 int symidx, len, i; in read_data() local 289 for (symidx = -1, i = 0; i < (int) n; i++) { in read_data() 294 symidx, STT_OBJECT, &name)) < 0) in read_data() 297 symidx = nextsym; in read_data() 304 name, symidx); in read_data() 322 int symidx; in read_funcs() local 336 for (symidx = -1, id = 0; v < end; id++) { in read_funcs() 348 if (cd->cd_symdata == NULL || (nextsym = next_sym(cd, symidx, in read_funcs() [all …]
|
/freebsd/contrib/llvm-project/lld/ELF/ |
H A D | OutputSections.cpp | 623 int64_t symidx = in.symTab->getSymbolIndex(sym); in encodeOneCrel() local 632 symidx = type = addend = 0; in encodeOneCrel() 637 uint8_t b = deltaOffset * 8 + (out.r_symidx != symidx) + in encodeOneCrel() 647 encodeSLEB128(static_cast<int32_t>(symidx - out.r_symidx), os); in encodeOneCrel() 648 out.r_symidx = symidx; in encodeOneCrel()
|
/freebsd/sys/arm64/linux/ |
H A D | linux_sysvec.c | 536 Elf_Size rtype, symidx; in linux_vdso_reloc() local 565 symidx = ELF_R_SYM(rela->r_info); in linux_vdso_reloc() 578 "symbol index %ld\n", rtype, symidx); in linux_vdso_reloc()
|