Lines Matching refs:ehdr
501 static void *ehdr_init(Elf64_Ehdr *ehdr, int mem_chunk_cnt) in ehdr_init() argument
503 memset(ehdr, 0, sizeof(*ehdr)); in ehdr_init()
504 memcpy(ehdr->e_ident, ELFMAG, SELFMAG); in ehdr_init()
505 ehdr->e_ident[EI_CLASS] = ELFCLASS64; in ehdr_init()
506 ehdr->e_ident[EI_DATA] = ELFDATA2MSB; in ehdr_init()
507 ehdr->e_ident[EI_VERSION] = EV_CURRENT; in ehdr_init()
508 memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD); in ehdr_init()
509 ehdr->e_type = ET_CORE; in ehdr_init()
510 ehdr->e_machine = EM_S390; in ehdr_init()
511 ehdr->e_version = EV_CURRENT; in ehdr_init()
512 ehdr->e_phoff = sizeof(Elf64_Ehdr); in ehdr_init()
513 ehdr->e_ehsize = sizeof(Elf64_Ehdr); in ehdr_init()
514 ehdr->e_phentsize = sizeof(Elf64_Phdr); in ehdr_init()
515 ehdr->e_phnum = mem_chunk_cnt + 1; in ehdr_init()
516 return ehdr + 1; in ehdr_init()