• Home
  • Raw
  • Download

Lines Matching refs:ehdr

1 static void glue(bswap_ehdr, SZ)(struct elfhdr *ehdr)  in glue()
3 bswap16s(&ehdr->e_type); /* Object file type */ in glue()
4 bswap16s(&ehdr->e_machine); /* Architecture */ in glue()
5 bswap32s(&ehdr->e_version); /* Object file version */ in glue()
6 bswapSZs(&ehdr->e_entry); /* Entry point virtual address */ in glue()
7 bswapSZs(&ehdr->e_phoff); /* Program header table file offset */ in glue()
8 bswapSZs(&ehdr->e_shoff); /* Section header table file offset */ in glue()
9 bswap32s(&ehdr->e_flags); /* Processor-specific flags */ in glue()
10 bswap16s(&ehdr->e_ehsize); /* ELF header size in bytes */ in glue()
11 bswap16s(&ehdr->e_phentsize); /* Program header table entry size */ in glue()
12 bswap16s(&ehdr->e_phnum); /* Program header table entry count */ in glue()
13 bswap16s(&ehdr->e_shentsize); /* Section header table entry size */ in glue()
14 bswap16s(&ehdr->e_shnum); /* Section header table entry count */ in glue()
15 bswap16s(&ehdr->e_shstrndx); /* Section header string table index */ in glue()
63 static int glue(load_symbols, SZ)(struct elfhdr *ehdr, int fd, int must_swab) in glue()
74 shdr_table = load_at(fd, ehdr->e_shoff, in glue()
75 sizeof(struct elf_shdr) * ehdr->e_shnum); in glue()
80 for (i = 0; i < ehdr->e_shnum; i++) { in glue()
85 symtab = glue(find_section, SZ)(shdr_table, ehdr->e_shnum, SHT_SYMTAB); in glue()
109 if (symtab->sh_link >= ehdr->e_shnum) in glue()
145 struct elfhdr ehdr; in glue() local
152 if (read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr)) in glue()
155 glue(bswap_ehdr, SZ)(&ehdr); in glue()
158 if (ELF_MACHINE != ehdr.e_machine) in glue()
162 *pentry = (uint64_t)(elf_sword)ehdr.e_entry; in glue()
164 glue(load_symbols, SZ)(&ehdr, fd, must_swab); in glue()
166 size = ehdr.e_phnum * sizeof(phdr[0]); in glue()
167 lseek(fd, ehdr.e_phoff, SEEK_SET); in glue()
174 for(i = 0; i < ehdr.e_phnum; i++) { in glue()
181 for(i = 0; i < ehdr.e_phnum; i++) { in glue()