Home
last modified time | relevance | path

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

/scripts/
Drecordmcount.h211 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()
216 return w2(ehdr->e_shnum); in get_shnum()
219 static void set_shnum(Elf_Ehdr *ehdr, Elf_Shdr *shdr0, unsigned int new_shnum) in set_shnum() argument
222 ehdr->e_shnum = 0; in set_shnum()
225 ehdr->e_shnum = w2(new_shnum); in set_shnum()
228 static int get_shstrndx(Elf_Ehdr const *ehdr, Elf_Shdr const *shdr0) in get_shstrndx() argument
230 if (ehdr->e_shstrndx != SHN_XINDEX) in get_shstrndx()
231 return w2(ehdr->e_shstrndx); in get_shstrndx()
236 static void find_symtab(Elf_Ehdr *const ehdr, Elf_Shdr const *shdr0, in find_symtab() argument
[all …]
Dsorttable.c304 Elf32_Ehdr *ehdr = addr; in do_file() local
307 switch (ehdr->e_ident[EI_DATA]) { in do_file()
326 ehdr->e_ident[EI_DATA], fname); in do_file()
330 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || in do_file()
331 (r2(&ehdr->e_type) != ET_EXEC && r2(&ehdr->e_type) != ET_DYN) || in do_file()
332 ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
337 switch (r2(&ehdr->e_machine)) { in do_file()
361 r2(&ehdr->e_machine), fname); in do_file()
365 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
367 if (r2(&ehdr->e_ehsize) != sizeof(Elf32_Ehdr) || in do_file()
[all …]
Dsorttable.h195 static int do_sort(Elf_Ehdr *ehdr, in do_sort() argument
200 Elf_Shdr *s, *shdr = (Elf_Shdr *)((char *)ehdr + _r(&ehdr->e_shoff)); in do_sort()
226 shstrndx = r2(&ehdr->e_shstrndx); in do_sort()
229 secstrings = (const char *)ehdr + _r(&shdr[shstrndx].sh_offset); in do_sort()
231 shnum = r2(&ehdr->e_shnum); in do_sort()
249 relocs = (void *)ehdr + _r(&s->sh_offset); in do_sort()
253 symtab_shndx = (Elf32_Word *)((const char *)ehdr + in do_sort()
260 g_orc_ip_table = (int *)((void *)ehdr + in do_sort()
265 g_orc_table = (struct orc_entry *)((void *)ehdr + in do_sort()
312 extab_image = (void *)ehdr + _r(&extab_sec->sh_offset); in do_sort()
[all …]
Drecordmcount.c484 Elf32_Ehdr *ehdr; in do_file() local
487 ehdr = mmap_file(fname); in do_file()
488 if (!ehdr) in do_file()
494 switch (ehdr->e_ident[EI_DATA]) { in do_file()
498 ehdr->e_ident[EI_DATA], fname); in do_file()
527 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || in do_file()
528 w2(ehdr->e_type) != ET_REL || in do_file()
529 ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
535 switch (w2(ehdr->e_machine)) { in do_file()
538 w2(ehdr->e_machine), fname); in do_file()
[all …]