static void fill_elf_header(struct elfhdr *elf, int segs, uint16_t machine,

                            uint32_t flags)

{

    (void) memset(elf, 0, sizeof(*elf));



    (void) memcpy(elf->e_ident, ELFMAG, SELFMAG);

    elf->e_ident[EI_CLASS] = ELF_CLASS;

    elf->e_ident[EI_DATA] = ELF_DATA;

    elf->e_ident[EI_VERSION] = EV_CURRENT;

    elf->e_ident[EI_OSABI] = ELF_OSABI;



    elf->e_type = ET_CORE;

    elf->e_machine = machine;

    elf->e_version = EV_CURRENT;

    elf->e_phoff = sizeof(struct elfhdr);

    elf->e_flags = flags;

    elf->e_ehsize = sizeof(struct elfhdr);

    elf->e_phentsize = sizeof(struct elf_phdr);

    elf->e_phnum = segs;



#ifdef BSWAP_NEEDED

    bswap_ehdr(elf);

#endif

}

static void fill_elf_header(struct elfhdr *elf, int segs, uint16_t machine,

                            uint32_t flags)

{

    (void) memset(elf, 0, sizeof(*elf));



    (void) memcpy(elf->e_ident, ELFMAG, SELFMAG);

    elf->e_ident[EI_CLASS] = ELF_CLASS;

    elf->e_ident[EI_DATA] = ELF_DATA;

    elf->e_ident[EI_VERSION] = EV_CURRENT;

    elf->e_ident[EI_OSABI] = ELF_OSABI;



    elf->e_type = ET_CORE;

    elf->e_machine = machine;

    elf->e_version = EV_CURRENT;

    elf->e_phoff = sizeof(struct elfhdr);

    elf->e_flags = flags;

    elf->e_ehsize = sizeof(struct elfhdr);

    elf->e_phentsize = sizeof(struct elf_phdr);

    elf->e_phnum = segs;



#ifdef BSWAP_NEEDED

    bswap_ehdr(elf);

#endif

}

static void FUNC_0(struct elfhdr *VAR_0, int VAR_1, uint16_t VAR_2,

                            uint32_t VAR_3)

{

    (void) memset(VAR_0, 0, sizeof(*VAR_0));



    (void) memcpy(VAR_0->e_ident, ELFMAG, SELFMAG);

    VAR_0->e_ident[EI_CLASS] = ELF_CLASS;

    VAR_0->e_ident[EI_DATA] = ELF_DATA;

    VAR_0->e_ident[EI_VERSION] = EV_CURRENT;

    VAR_0->e_ident[EI_OSABI] = ELF_OSABI;



    VAR_0->e_type = ET_CORE;

    VAR_0->e_machine = VAR_2;

    VAR_0->e_version = EV_CURRENT;

    VAR_0->e_phoff = sizeof(struct elfhdr);

    VAR_0->e_flags = VAR_3;

    VAR_0->e_ehsize = sizeof(struct elfhdr);

    VAR_0->e_phentsize = sizeof(struct elf_phdr);

    VAR_0->e_phnum = VAR_1;



#ifdef BSWAP_NEEDED

    bswap_ehdr(VAR_0);

#endif

}

static void FUNC_0(struct elfhdr *VAR_0, int VAR_1, uint16_t VAR_2,
uint32_t VAR_3)
{ (void) memset(VAR_0, 0, sizeof(*VAR_0)); (void) memcpy(VAR_0->e_ident, ELFMAG, SELFMAG); VAR_0->e_ident[EI_CLASS] = ELF_CLASS; VAR_0->e_ident[EI_DATA] = ELF_DATA; VAR_0->e_ident[EI_VERSION] = EV_CURRENT; VAR_0->e_ident[EI_OSABI] = ELF_OSABI; VAR_0->e_type = ET_CORE; VAR_0->e_machine = VAR_2; VAR_0->e_version = EV_CURRENT; VAR_0->e_phoff = sizeof(struct elfhdr); VAR_0->e_flags = VAR_3; VAR_0->e_ehsize = sizeof(struct elfhdr); VAR_0->e_phentsize = sizeof(struct elf_phdr); VAR_0->e_phnum = VAR_1; #ifdef BSWAP_NEEDED
bswap_ehdr(VAR_0); #endif
}