Searched refs:ehdr (Results 1 - 9 of 9) sorted by relevance

/barrelfish-2018-10-04/lib/libc/gen/
H A Dnlist.c204 * __elf_is_okay__ - Determine if ehdr really
211 __elf_is_okay__(Elf_Ehdr *ehdr) argument
220 if (IS_ELF(*ehdr) &&
221 ehdr->e_ident[EI_CLASS] == ELF_TARG_CLASS &&
222 ehdr->e_ident[EI_DATA] == ELF_TARG_DATA &&
223 ehdr->e_ident[EI_VERSION] == ELF_TARG_VER) {
226 if (ehdr->e_machine == ELF_TARG_MACH &&
227 ehdr->e_version == ELF_TARG_VER)
244 Elf_Ehdr ehdr; local
253 _read(fd, &ehdr, sizeo
[all...]
/barrelfish-2018-10-04/tools/usbboot/
H A Dusbboot.c296 Elf32_Ehdr *ehdr= elf32_getehdr(elf); local
297 if(!ehdr) fail_elf("elf32_getehdr");
299 if(ehdr->e_type != ET_EXEC) fail("Not an executable.\n");
300 if(ehdr->e_machine != EM_ARM) fail("Not an ARM binary.\n");
302 if(ehdr->e_phnum == 0) fail("No loadable segment.\n");
303 if(ehdr->e_phnum > 1) fail("More than one loadable segment.\n");
313 ehdr->e_entry);
318 *entry_point= ehdr->e_entry;
/barrelfish-2018-10-04/usr/drivers/cpuboot/arch/armv8/
H A Dboot_arch.c283 struct Elf64_Ehdr *ehdr = (struct Elf64_Ehdr *)binary->vaddr; local
285 size_t shnum = ehdr->e_shnum;
286 struct Elf64_Phdr *phdr = (struct Elf64_Phdr *)(binary->vaddr + ehdr->e_phoff);
287 struct Elf64_Shdr *shead = (struct Elf64_Shdr *)(binary->vaddr + (uintptr_t)ehdr->e_shoff);
371 struct Elf64_Ehdr *ehdr = (struct Elf64_Ehdr *)addr; local
378 if(ehdr->e_ident[EI_CLASS] != ELFCLASS64 || ehdr->e_ident[EI_DATA] != ELFDATA2LSB) {
382 if(ehdr->e_ident[EI_OSABI] != ELFOSABI_STANDALONE
383 && ehdr->e_ident[EI_OSABI] != ELFOSABI_NONE) {
385 ehdr
412 struct Elf64_Ehdr *ehdr = (struct Elf64_Ehdr *)binary->vaddr; local
[all...]
/barrelfish-2018-10-04/tools/fastmodels/
H A Dtest_mkmb.c139 Elf64_Ehdr *ehdr= elf64_getehdr(elf); local
140 if(!ehdr) elf_fail("elf64_getehdr");
142 printf("Entry point: %lx\n", ehdr->e_entry);
H A Dmain.c205 Elf64_Ehdr *ehdr= elf64_getehdr(kernel_elf); local
206 if(!ehdr) elf_fail("elf64_getehdr");
207 *entry= virt_base + (ehdr->e_entry - base);
343 Elf64_Ehdr *ehdr= elf64_getehdr(shim_elf); local
344 if(!ehdr) elf_fail("elf64_getehdr");
345 *shim_entry= virt_base + (ehdr->e_entry - base);
/barrelfish-2018-10-04/usr/drivers/cpuboot/arch/armv7/
H A Dboot_arch.c280 struct Elf32_Ehdr *ehdr= (struct Elf32_Ehdr *)elfdata; local
282 if(!IS_ELF(*ehdr) ||
283 ehdr->e_ident[EI_CLASS] != ELFCLASS32 ||
284 ehdr->e_machine != EM_ARM) {
288 void *phdrs_base= (void *)(elfdata + ehdr->e_phoff);
290 for(size_t i= 0; i < ehdr->e_phnum; i++) {
291 struct Elf32_Phdr *phdr= phdrs_base + i * ehdr->e_phentsize;
/barrelfish-2018-10-04/include/elf/
H A Delf.h110 #define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
111 (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
112 (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
113 (ehdr).e_ident[EI_MAG3] == ELFMAG3)
/barrelfish-2018-10-04/tools/arm_boot/
H A Darm_bootimage.c142 Elf32_Ehdr *ehdr= elf32_getehdr(elf); local
143 if(!ehdr) fail_elf("elf32_getehdr");
144 uint32_t entry= ehdr->e_entry;
161 Elf_Scn *shstrscn= elf_getscn(elf, ehdr->e_shstrndx);
177 size_t sh_totalsize= ehdr->e_shnum * ehdr->e_shentsize;
178 assert(ehdr->e_shoff + sh_totalsize <= elfsize);
181 image->shdrs_entsize= ehdr->e_shentsize;
184 memcpy(image->shdrs, elfdata + ehdr->e_shoff, sh_totalsize);
/barrelfish-2018-10-04/include/sys/
H A Delf_common.h183 #define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
184 (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
185 (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
186 (ehdr).e_ident[EI_MAG3] == ELFMAG3)

Completed in 74 milliseconds