Home
last modified time | relevance | path

Searched refs:ehdr (Results 1 – 4 of 4) sorted by relevance

/scripts/
Drecordmcount.h177 static int append_func(Elf_Ehdr *const ehdr, in append_func() argument
191 unsigned const old_shnum = w2(ehdr->e_shnum); in append_func()
192 uint_t const old_shoff = _w(ehdr->e_shoff); in append_func()
207 if (uwrite(old_shstr_sh_offset + (void *)ehdr, old_shstr_sh_size) < 0) in append_func()
216 if (uwrite(old_shoff + (void *)ehdr, in append_func()
257 ehdr->e_shoff = _w(new_e_shoff); in append_func()
258 ehdr->e_shnum = w2(2 + w2(ehdr->e_shnum)); /* {.rel,}__mcount_loc */ in append_func()
261 if (uwrite(ehdr, sizeof(*ehdr)) < 0) in append_func()
289 Elf_Ehdr const *const ehdr, in get_sym_str_and_relp() argument
294 Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) in get_sym_str_and_relp()
[all …]
Dsortextable.h91 do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_t custom_sort) in do_func() argument
115 shdr = (Elf_Shdr *)((char *)ehdr + _r(&ehdr->e_shoff)); in do_func()
117 num_sections = r2(&ehdr->e_shnum); in do_func()
121 secindex_strings = r2(&ehdr->e_shstrndx); in do_func()
126 secstrtab = (const char *)ehdr + _r(&shstrtab_sec->sh_offset); in do_func()
136 relocs = (void *)ehdr + _r(&shdr[i].sh_offset); in do_func()
145 (const char *)ehdr + _r(&shdr[i].sh_offset)); in do_func()
155 symtab = (const Elf_Sym *)((const char *)ehdr + in do_func()
161 strtab = (const char *)ehdr + _r(&strtab_sec->sh_offset); in do_func()
163 extab_image = (void *)ehdr + _r(&extab_sec->sh_offset); in do_func()
[all …]
Dsortextable.c271 Elf32_Ehdr *ehdr = mmap_file(fname); in do_file() local
273 ehdr_curr = ehdr; in do_file()
274 switch (ehdr->e_ident[EI_DATA]) { in do_file()
277 ehdr->e_ident[EI_DATA], fname); in do_file()
297 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 in do_file()
298 || (r2(&ehdr->e_type) != ET_EXEC && r2(&ehdr->e_type) != ET_DYN) in do_file()
299 || ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
305 switch (r2(&ehdr->e_machine)) { in do_file()
308 r2(&ehdr->e_machine), fname); in do_file()
332 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
[all …]
Drecordmcount.c475 Elf32_Ehdr *ehdr; in do_file() local
478 ehdr = mmap_file(fname); in do_file()
479 if (!ehdr) in do_file()
485 switch (ehdr->e_ident[EI_DATA]) { in do_file()
489 ehdr->e_ident[EI_DATA], fname); in do_file()
518 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || in do_file()
519 w2(ehdr->e_type) != ET_REL || in do_file()
520 ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
526 switch (w2(ehdr->e_machine)) { in do_file()
529 w2(ehdr->e_machine), fname); in do_file()
[all …]