Lines Matching defs:shdr0

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