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.c271 Elf32_Ehdr *ehdr = addr; in do_file() local
274 switch (ehdr->e_ident[EI_DATA]) { in do_file()
293 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()
304 switch (r2(&ehdr->e_machine)) { in do_file()
327 r2(&ehdr->e_machine), fname); in do_file()
331 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
333 if (r2(&ehdr->e_ehsize) != sizeof(Elf32_Ehdr) || in do_file()
[all …]
Dsorttable.h208 Elf_Ehdr *ehdr; member
221 unsigned char *start_loc = (void *)emloc->ehdr + offset; in sort_mcount_loc()
264 static int do_sort(Elf_Ehdr *ehdr, in do_sort() argument
269 Elf_Shdr *s, *shdr = (Elf_Shdr *)((char *)ehdr + _r(&ehdr->e_shoff)); in do_sort()
300 shstrndx = r2(&ehdr->e_shstrndx); in do_sort()
303 secstrings = (const char *)ehdr + _r(&shdr[shstrndx].sh_offset); in do_sort()
305 shnum = r2(&ehdr->e_shnum); in do_sort()
323 relocs = (void *)ehdr + _r(&s->sh_offset); in do_sort()
327 symtab_shndx = (Elf32_Word *)((const char *)ehdr + in do_sort()
334 mstruct.ehdr = ehdr; in do_sort()
[all …]
Drecordmcount.c514 Elf32_Ehdr *ehdr; in do_file() local
517 ehdr = mmap_file(fname); in do_file()
518 if (!ehdr) in do_file()
524 switch (ehdr->e_ident[EI_DATA]) { in do_file()
528 ehdr->e_ident[EI_DATA], fname); in do_file()
557 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || in do_file()
558 w2(ehdr->e_type) != ET_REL || in do_file()
559 ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
565 switch (w2(ehdr->e_machine)) { in do_file()
568 w2(ehdr->e_machine), fname); in do_file()
[all …]