Lines Matching refs:ehdr
178 static void append_func(Elf_Ehdr *const ehdr, in append_func() argument
192 unsigned const old_shnum = w2(ehdr->e_shnum); in append_func()
193 uint_t const old_shoff = _w(ehdr->e_shoff); in append_func()
207 uwrite(fd_map, old_shstr_sh_offset + (void *)ehdr, old_shstr_sh_size); in append_func()
213 uwrite(fd_map, old_shoff + (void *)ehdr, in append_func()
248 ehdr->e_shoff = _w(new_e_shoff); in append_func()
249 ehdr->e_shnum = w2(2 + w2(ehdr->e_shnum)); /* {.rel,}__mcount_loc */ in append_func()
251 uwrite(fd_map, ehdr, sizeof(*ehdr)); in append_func()
275 Elf_Ehdr const *const ehdr, in get_sym_str_and_relp() argument
280 Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) in get_sym_str_and_relp()
281 + (void *)ehdr); in get_sym_str_and_relp()
286 + (void *)ehdr); in get_sym_str_and_relp()
289 + (void *)ehdr); in get_sym_str_and_relp()
292 + (void *)ehdr); in get_sym_str_and_relp()
306 Elf_Ehdr const *const ehdr, in sift_rel_mcount() argument
321 get_sym_str_and_relp(relhdr, ehdr, &sym0, &str0, &relp); in sift_rel_mcount()
353 Elf_Ehdr const *const ehdr, in nop_mcount() argument
356 Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) in nop_mcount()
357 + (void *)ehdr); in nop_mcount()
368 get_sym_str_and_relp(relhdr, ehdr, &sym0, &str0, &relp); in nop_mcount()
378 ret = make_nop((void *)ehdr, shdr->sh_offset + relp->r_offset); in nop_mcount()
397 ulseek(fd_map, (void *)relp - (void *)ehdr, SEEK_SET); in nop_mcount()
419 Elf_Ehdr const *const ehdr) in find_secsym_ndx() argument
422 + (void *)ehdr); in find_secsym_ndx()
434 if (w2(ehdr->e_machine) == EM_ARM in find_secsym_ndx()
501 do_func(Elf_Ehdr *const ehdr, char const *const fname, unsigned const reltype) in do_func() argument
503 Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) in do_func()
504 + (void *)ehdr); in do_func()
505 unsigned const nhdr = w2(ehdr->e_shnum); in do_func()
506 Elf_Shdr *const shstr = &shdr0[w2(ehdr->e_shstrndx)]; in do_func()
508 + (void *)ehdr); in do_func()
533 ehdr); in do_func()
538 relhdr, ehdr, recsym, recval, reltype); in do_func()
544 nop_mcount(relhdr, ehdr, txtname); in do_func()
548 append_func(ehdr, shstr, mloc0, mlocp, mrel0, mrelp, in do_func()