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()
277 Elf_Ehdr const *const ehdr, in get_sym_str_and_relp() argument
282 Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) in get_sym_str_and_relp()
283 + (void *)ehdr); in get_sym_str_and_relp()
288 + (void *)ehdr); in get_sym_str_and_relp()
291 + (void *)ehdr); in get_sym_str_and_relp()
294 + (void *)ehdr); in get_sym_str_and_relp()
308 Elf_Ehdr const *const ehdr, in sift_rel_mcount() argument
323 get_sym_str_and_relp(relhdr, ehdr, &sym0, &str0, &relp); in sift_rel_mcount()
355 Elf_Ehdr const *const ehdr, in nop_mcount() argument
358 Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) in nop_mcount()
359 + (void *)ehdr); in nop_mcount()
370 get_sym_str_and_relp(relhdr, ehdr, &sym0, &str0, &relp); in nop_mcount()
380 ret = make_nop((void *)ehdr, _w(shdr->sh_offset) + _w(relp->r_offset)); in nop_mcount()
399 ulseek(fd_map, (void *)relp - (void *)ehdr, SEEK_SET); in nop_mcount()
421 Elf_Ehdr const *const ehdr) in find_secsym_ndx() argument
424 + (void *)ehdr); in find_secsym_ndx()
436 if (w2(ehdr->e_machine) == EM_ARM in find_secsym_ndx()
503 do_func(Elf_Ehdr *const ehdr, char const *const fname, unsigned const reltype) in do_func() argument
505 Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) in do_func()
506 + (void *)ehdr); in do_func()
507 unsigned const nhdr = w2(ehdr->e_shnum); in do_func()
508 Elf_Shdr *const shstr = &shdr0[w2(ehdr->e_shstrndx)]; in do_func()
510 + (void *)ehdr); in do_func()
535 ehdr); in do_func()
540 relhdr, ehdr, recsym, recval, reltype); in do_func()
546 nop_mcount(relhdr, ehdr, txtname); in do_func()
550 append_func(ehdr, shstr, mloc0, mlocp, mrel0, mrelp, in do_func()