Lines Matching refs:relhdr
235 Elf_Shdr const *relhdr; in find_symtab() local
241 for (relhdr = shdr0, k = nhdr; k; --k, ++relhdr) { in find_symtab()
242 if (relhdr->sh_type == SHT_SYMTAB) in find_symtab()
243 *symtab = (void *)ehdr + relhdr->sh_offset; in find_symtab()
244 else if (relhdr->sh_type == SHT_SYMTAB_SHNDX) in find_symtab()
245 *symtab_shndx = (void *)ehdr + relhdr->sh_offset; in find_symtab()
367 static void get_sym_str_and_relp(Elf_Shdr const *const relhdr, in get_sym_str_and_relp() argument
375 unsigned const symsec_sh_link = w(relhdr->sh_link); in get_sym_str_and_relp()
378 Elf_Rel const *const rel0 = (Elf_Rel const *)(_w(relhdr->sh_offset) in get_sym_str_and_relp()
398 Elf_Shdr const *const relhdr, in sift_rel_mcount() argument
409 unsigned rel_entsize = _w(relhdr->sh_entsize); in sift_rel_mcount()
410 unsigned const nrel = _w(relhdr->sh_size) / rel_entsize; in sift_rel_mcount()
414 get_sym_str_and_relp(relhdr, ehdr, &sym0, &str0, &relp); in sift_rel_mcount()
446 static int nop_mcount(Elf_Shdr const *const relhdr, in nop_mcount() argument
455 Elf_Shdr const *const shdr = &shdr0[w(relhdr->sh_info)]; in nop_mcount()
456 unsigned rel_entsize = _w(relhdr->sh_entsize); in nop_mcount()
457 unsigned const nrel = _w(relhdr->sh_size) / rel_entsize; in nop_mcount()
462 get_sym_str_and_relp(relhdr, ehdr, &sym0, &str0, &relp); in nop_mcount()
548 static char const * __has_rel_mcount(Elf_Shdr const *const relhdr, /* reltype */ in __has_rel_mcount() argument
554 Elf_Shdr const *const txthdr = &shdr0[w(relhdr->sh_info)]; in __has_rel_mcount()
568 static char const *has_rel_mcount(Elf_Shdr const *const relhdr, in has_rel_mcount() argument
573 if (w(relhdr->sh_type) != SHT_REL && w(relhdr->sh_type) != SHT_RELA) in has_rel_mcount()
575 return __has_rel_mcount(relhdr, shdr0, shstrtab, fname); in has_rel_mcount()
611 Elf_Shdr const *relhdr; in do_func() local
649 for (relhdr = shdr0, k = nhdr; k; --k, ++relhdr) { in do_func()
650 char const *const txtname = has_rel_mcount(relhdr, shdr0, in do_func()
661 symsec_sh_link = w(relhdr->sh_link); in do_func()
662 result = find_secsym_ndx(w(relhdr->sh_info), txtname, in do_func()
670 rel_entsize = _w(relhdr->sh_entsize); in do_func()
673 relhdr, ehdr, recsym, recval, reltype); in do_func()
679 if (nop_mcount(relhdr, ehdr, txtname) < 0) { in do_func()