Lines Matching refs:ehdr
467 static void *ehdr_init(Elf64_Ehdr *ehdr, int mem_chunk_cnt) in ehdr_init() argument
469 memset(ehdr, 0, sizeof(*ehdr)); in ehdr_init()
470 memcpy(ehdr->e_ident, ELFMAG, SELFMAG); in ehdr_init()
471 ehdr->e_ident[EI_CLASS] = ELFCLASS64; in ehdr_init()
472 ehdr->e_ident[EI_DATA] = ELFDATA2MSB; in ehdr_init()
473 ehdr->e_ident[EI_VERSION] = EV_CURRENT; in ehdr_init()
474 memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD); in ehdr_init()
475 ehdr->e_type = ET_CORE; in ehdr_init()
476 ehdr->e_machine = EM_S390; in ehdr_init()
477 ehdr->e_version = EV_CURRENT; in ehdr_init()
478 ehdr->e_phoff = sizeof(Elf64_Ehdr); in ehdr_init()
479 ehdr->e_ehsize = sizeof(Elf64_Ehdr); in ehdr_init()
480 ehdr->e_phentsize = sizeof(Elf64_Phdr); in ehdr_init()
481 ehdr->e_phnum = mem_chunk_cnt + 1; in ehdr_init()
482 return ehdr + 1; in ehdr_init()