Lines Matching refs:relhdr
240 Elf_Shdr const *relhdr; in find_symtab() local
246 for (relhdr = shdr0, k = nhdr; k; --k, ++relhdr) { in find_symtab()
247 if (relhdr->sh_type == SHT_SYMTAB) in find_symtab()
248 *symtab = (void *)ehdr + relhdr->sh_offset; in find_symtab()
249 else if (relhdr->sh_type == SHT_SYMTAB_SHNDX) in find_symtab()
250 *symtab_shndx = (void *)ehdr + relhdr->sh_offset; in find_symtab()
372 static void get_sym_str_and_relp(Elf_Shdr const *const relhdr, in get_sym_str_and_relp() argument
380 unsigned const symsec_sh_link = w(relhdr->sh_link); in get_sym_str_and_relp()
383 Elf_Rel const *const rel0 = (Elf_Rel const *)(_w(relhdr->sh_offset) in get_sym_str_and_relp()
403 Elf_Shdr const *const relhdr, in sift_rel_mcount() argument
414 unsigned rel_entsize = _w(relhdr->sh_entsize); in sift_rel_mcount()
415 unsigned const nrel = _w(relhdr->sh_size) / rel_entsize; in sift_rel_mcount()
419 get_sym_str_and_relp(relhdr, ehdr, &sym0, &str0, &relp); in sift_rel_mcount()
451 static int nop_mcount(Elf_Shdr const *const relhdr, in nop_mcount() argument
460 Elf_Shdr const *const shdr = &shdr0[w(relhdr->sh_info)]; in nop_mcount()
461 unsigned rel_entsize = _w(relhdr->sh_entsize); in nop_mcount()
462 unsigned const nrel = _w(relhdr->sh_size) / rel_entsize; in nop_mcount()
467 get_sym_str_and_relp(relhdr, ehdr, &sym0, &str0, &relp); in nop_mcount()
553 static char const * __has_rel_mcount(Elf_Shdr const *const relhdr, /* reltype */ in __has_rel_mcount() argument
559 Elf_Shdr const *const txthdr = &shdr0[w(relhdr->sh_info)]; in __has_rel_mcount()
573 static char const *has_rel_mcount(Elf_Shdr const *const relhdr, in has_rel_mcount() argument
578 if (w(relhdr->sh_type) != SHT_REL && w(relhdr->sh_type) != SHT_RELA) in has_rel_mcount()
580 return __has_rel_mcount(relhdr, shdr0, shstrtab, fname); in has_rel_mcount()
616 Elf_Shdr const *relhdr; in do_func() local
654 for (relhdr = shdr0, k = nhdr; k; --k, ++relhdr) { in do_func()
655 char const *const txtname = has_rel_mcount(relhdr, shdr0, in do_func()
666 symsec_sh_link = w(relhdr->sh_link); in do_func()
667 result = find_secsym_ndx(w(relhdr->sh_info), txtname, in do_func()
675 rel_entsize = _w(relhdr->sh_entsize); in do_func()
678 relhdr, ehdr, recsym, recval, reltype); in do_func()
684 if (nop_mcount(relhdr, ehdr, txtname) < 0) { in do_func()