FreeBSD/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c
/*
 * Convert a 32-bit ELF file header into GElf.
 */
Convert a 32-bit ELF file header into GElf.
Convert a 32 - bit ELF file header into GElf .
static void
ehdr_to_gelf(const Elf32_Ehdr *src, GElf_Ehdr *dst)
{
	bcopy(src->e_ident, dst->e_ident, EI_NIDENT);
	dst->e_type = src->e_type;
	dst->e_machine = src->e_machine;
	dst->e_version = src->e_version;
	dst->e_entry = (Elf64_Addr)src->e_entry;
	dst->e_phoff = (Elf64_Off)src->e_phoff;
	dst->e_shoff = (Elf64_Off)src->e_shoff;
	dst->e_flags = src->e_flags;
	dst->e_ehsize = src->e_ehsize;
	dst->e_phentsize = src->e_phentsize;
	dst->e_phnum = src->e_phnum;
	dst->e_shentsize = src->e_shentsize;
	dst->e_shnum = src->e_shnum;
	dst->e_shstrndx = src->e_shstrndx;
}
static void ehdr_to_gelf ( const Elf32_Ehdr * src , GElf_Ehdr * dst ) { bcopy ( src -> e_ident , dst -> e_ident , EI_NIDENT ) ; dst -> e_type = src -> e_type ; dst -> e_machine = src -> e_machine ; dst -> e_version = src -> e_version ; dst -> e_entry = ( Elf64_Addr ) src -> e_entry ; dst -> e_phoff = ( Elf64_Off ) src -> e_phoff ; dst -> e_shoff = ( Elf64_Off ) src -> e_shoff ; dst -> e_flags = src -> e_flags ; dst -> e_ehsize = src -> e_ehsize ; dst -> e_phentsize = src -> e_phentsize ; dst -> e_phnum = src -> e_phnum ; dst -> e_shentsize = src -> e_shentsize ; dst -> e_shnum = src -> e_shnum ; dst -> e_shstrndx = src -> e_shstrndx ; }
Convert a 32-bit ELF file header into GElf.
Convert a 32 - bit ELF file header into GElf .