Lines Matching refs:shdr0
211 static unsigned int get_shnum(Elf_Ehdr const *ehdr, Elf_Shdr const *shdr0) in get_shnum() argument
213 if (shdr0 && !ehdr->e_shnum) in get_shnum()
214 return w(shdr0->sh_size); in get_shnum()
219 static void set_shnum(Elf_Ehdr *ehdr, Elf_Shdr *shdr0, unsigned int new_shnum) in set_shnum() argument
223 shdr0->sh_size = w(new_shnum); in set_shnum()
228 static int get_shstrndx(Elf_Ehdr const *ehdr, Elf_Shdr const *shdr0) in get_shstrndx() argument
233 return w(shdr0->sh_link); in get_shstrndx()
236 static void find_symtab(Elf_Ehdr *const ehdr, Elf_Shdr const *shdr0, in find_symtab() argument
246 for (relhdr = shdr0, k = nhdr; k; --k, ++relhdr) { in find_symtab()
275 Elf_Shdr *const shdr0 = (Elf_Shdr *)(old_shoff + (void *)ehdr); in append_func() local
276 unsigned int const old_shnum = get_shnum(ehdr, shdr0); in append_func()
287 set_shnum(ehdr, shdr0, new_shnum); in append_func()
378 Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) in get_sym_str_and_relp() local
381 Elf_Shdr const *const symsec = &shdr0[symsec_sh_link]; in get_sym_str_and_relp()
382 Elf_Shdr const *const strsec = &shdr0[w(symsec->sh_link)]; in get_sym_str_and_relp()
455 Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) in nop_mcount() local
460 Elf_Shdr const *const shdr = &shdr0[w(relhdr->sh_info)]; in nop_mcount()
554 Elf_Shdr const *const shdr0, in __has_rel_mcount() argument
559 Elf_Shdr const *const txthdr = &shdr0[w(relhdr->sh_info)]; in __has_rel_mcount()
574 Elf_Shdr const *const shdr0, in has_rel_mcount() argument
580 return __has_rel_mcount(relhdr, shdr0, shstrtab, fname); in has_rel_mcount()
584 static unsigned tot_relsize(Elf_Shdr const *const shdr0, in tot_relsize() argument
590 Elf_Shdr const *shdrp = shdr0; in tot_relsize()
594 txtname = has_rel_mcount(shdrp, shdr0, shstrtab, fname); in tot_relsize()
609 Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) in do_func() local
611 unsigned const nhdr = get_shnum(ehdr, shdr0); in do_func()
612 Elf_Shdr *const shstr = &shdr0[get_shstrndx(ehdr, shdr0)]; in do_func()
636 totrelsz = tot_relsize(shdr0, nhdr, shstrtab, fname); in do_func()
652 find_symtab(ehdr, shdr0, nhdr, &symtab, &symtab_shndx); in do_func()
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()
669 &shdr0[symsec_sh_link], in do_func()