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

123

/freebsd-current/contrib/elftoolchain/libelf/
H A Dlibelf_ehdr.c108 void *ehdr; local
136 ehdr = (void *) e->e_u.e_elf.e_ehdr.e_ehdr32;
138 ehdr = (void *) e->e_u.e_elf.e_ehdr.e_ehdr64;
140 if (ehdr != NULL) /* already have a translated ehdr */
141 return (ehdr);
154 if ((ehdr = calloc((size_t) 1, msz)) == NULL) {
160 e->e_u.e_elf.e_ehdr.e_ehdr32 = ehdr;
161 EHDR_INIT(ehdr,32);
163 e->e_u.e_elf.e_ehdr.e_ehdr64 = ehdr;
[all...]
H A Delf_scn.c58 _libelf_load_section_headers(Elf *e, void *ehdr) argument
70 assert(ehdr != NULL);
91 eh32 = (Elf32_Ehdr *) ehdr;
95 eh64 = (Elf64_Ehdr *) ehdr;
148 void *ehdr; local
157 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
162 _libelf_load_section_headers(e, ehdr) == 0)
193 void *ehdr; local
206 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
221 _libelf_load_section_headers(e, ehdr)
[all...]
H A Dlibelf_phdr.c44 void *ehdr, *phdr; local
63 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
69 eh32 = (Elf32_Ehdr *) ehdr;
72 eh64 = (Elf64_Ehdr *) ehdr;
115 void *ehdr, *newphdr, *oldphdr; local
123 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL) {
H A Delf_flag.c84 void *ehdr; local
97 ehdr = e->e_u.e_elf.e_ehdr.e_ehdr32;
99 ehdr = e->e_u.e_elf.e_ehdr.e_ehdr64;
101 if (ehdr == NULL) {
H A Dgelf_ehdr.c122 void *ehdr; local
137 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
143 eh64 = (Elf64_Ehdr *) ehdr;
148 eh32 = (Elf32_Ehdr *) ehdr;
H A Delf_update.c517 void *ehdr, *phdr; local
530 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
533 eh32 = ehdr;
534 eh64 = ehdr;
605 ehdr))
651 _libelf_load_section_headers(e, ehdr) == 0)
694 _libelf_setphnum(e, ehdr, ec, phnum);
695 _libelf_setshnum(e, ehdr, ec, shnum);
851 void *ehdr; local
860 ehdr
895 void *ehdr; local
957 void *ehdr; local
[all...]
/freebsd-current/sys/compat/linux/
H A Dlinux_vdso.c105 Elf_Ehdr *ehdr; local
110 ehdr = (Elf_Ehdr *)base;
112 MPASS(IS_ELF(*ehdr));
113 MPASS(ehdr->e_ident[EI_CLASS] == ELF_TARG_CLASS);
114 MPASS(ehdr->e_ident[EI_DATA] == ELF_TARG_DATA);
115 MPASS(ehdr->e_ident[EI_VERSION] == EV_CURRENT);
116 MPASS(ehdr->e_shentsize == sizeof(Elf_Shdr));
117 MPASS(ehdr->e_shoff != 0);
118 MPASS(ehdr->e_type == ET_DYN);
120 shdr = (const Elf_Shdr *)(base + ehdr
[all...]
/freebsd-current/sys/powerpc/ofw/
H A Dofw_initrd.c61 Elf_Ehdr ehdr; local
96 memcpy(&ehdr, taste, sizeof(ehdr));
98 if (IS_ELF(ehdr)) {
/freebsd-current/sys/kern/
H A Dkern_dump.c289 Elf_Ehdr ehdr; local
300 bzero(&ehdr, sizeof(ehdr));
301 ehdr.e_ident[EI_MAG0] = ELFMAG0;
302 ehdr.e_ident[EI_MAG1] = ELFMAG1;
303 ehdr.e_ident[EI_MAG2] = ELFMAG2;
304 ehdr.e_ident[EI_MAG3] = ELFMAG3;
305 ehdr.e_ident[EI_CLASS] = ELF_CLASS;
307 ehdr.e_ident[EI_DATA] = ELFDATA2LSB;
309 ehdr
[all...]
/freebsd-current/stand/i386/libi386/
H A Delf64_freebsd.c71 Elf_Ehdr *ehdr; local
78 ehdr = (Elf_Ehdr *)&(md->md_data);
106 entry_lo = ehdr->e_entry & 0xffffffff;
107 entry_hi = (ehdr->e_entry >> 32) & 0xffffffff;
109 printf("Start @ %#llx ...\n", ehdr->e_entry);
H A Delf32_freebsd.c54 Elf_Ehdr *ehdr; local
60 ehdr = (Elf_Ehdr *)&(md->md_data);
65 entry = ehdr->e_entry & 0xffffff;
/freebsd-current/lib/libc/gen/
H A Dnlist.c91 * __elf_is_okay__ - Determine if ehdr really
98 __elf_is_okay__(Elf_Ehdr *ehdr) argument
107 if (IS_ELF(*ehdr) &&
108 ehdr->e_ident[EI_CLASS] == ELF_TARG_CLASS &&
109 ehdr->e_ident[EI_DATA] == ELF_TARG_DATA &&
110 ehdr->e_ident[EI_VERSION] == ELF_TARG_VER) {
113 if (ehdr->e_machine == ELF_TARG_MACH &&
114 ehdr->e_version == ELF_TARG_VER)
131 Elf_Ehdr ehdr; local
140 _read(fd, &ehdr, sizeo
[all...]
/freebsd-current/stand/common/
H A Dload_elf.c52 Elf_Ehdr *ehdr; member in struct:elf_file
129 static int elf_header_convert(Elf_Ehdr *ehdr) argument
155 CONVERT_SWITCH(ehdr, ehdr, HEADER_FIELDS);
162 static int elf_program_header_convert(const Elf_Ehdr *ehdr, Elf_Phdr *phdr) argument
174 CONVERT_SWITCH(ehdr, phdr, PROGRAM_HEADER_FIELDS);
181 static int elf_section_header_convert(const Elf_Ehdr *ehdr, Elf_Shdr *shdr) argument
195 CONVERT_SWITCH(ehdr, shdr, SECTION_HEADER_FIELDS);
204 static int elf_header_convert(Elf_Ehdr *ehdr) argument
209 static int elf_program_header_convert(const Elf_Ehdr *ehdr, Elf_Phd argument
214 elf_section_header_convert(const Elf_Ehdr *ehdr, Elf_Shdr *shdr) argument
271 Elf_Ehdr *ehdr; local
371 Elf_Ehdr *ehdr; local
535 Elf_Ehdr *ehdr; local
[all...]
/freebsd-current/cddl/contrib/opensolaris/tools/ctf/cvt/
H A Dutil.c68 GElf_Ehdr ehdr; local
71 if (gelf_getehdr(elf, &ehdr) == NULL)
72 elfterminate(file, "Couldn't read ehdr");
83 if ((name = elf_strptr(elf, ehdr.e_shstrndx,
100 GElf_Ehdr ehdr; local
102 if (gelf_getehdr(elf, &ehdr) == NULL) {
107 if (ehdr.e_ident[EI_CLASS] == ELFCLASS32)
109 else if (ehdr.e_ident[EI_CLASS] == ELFCLASS64)
112 terminate("unknown ELF class %d\n", ehdr.e_ident[EI_CLASS]);
/freebsd-current/contrib/netbsd-tests/usr.bin/shmif_dumpbus/
H A Dt_basic.sh51 ehdr='bus version 2, lock: 0, generation: 22, firstoff: 0x9e414, lastoff: 0x9dfd0'
56 atf_check -s exit:0 -o inline:"${ehdr}\n" shmif_dumpbus -h shmbus
/freebsd-current/stand/userboot/userboot/
H A Delf32_freebsd.c57 Elf_Ehdr *ehdr; local
65 ehdr = (Elf_Ehdr *)&(md->md_data);
70 entry = ehdr->e_entry & 0xffffff;
H A Delf64_freebsd.c88 Elf_Ehdr *ehdr; local
100 ehdr = (Elf_Ehdr *)&(md->md_data);
138 printf("Start @ %#"PRIx64" ...\n", ehdr->e_entry);
161 CALLBACK(exec, ehdr->e_entry);
/freebsd-current/stand/efi/loader/arch/arm64/
H A Dexec.c65 Elf_Ehdr *ehdr; local
72 ehdr = (Elf_Ehdr *)&(md->md_data);
73 entry = efi_translate(ehdr->e_entry);
/freebsd-current/usr.bin/ldd/
H A Dldd.c266 has_freebsd_abi_tag(const char *fname, Elf *elf, GElf_Ehdr *ehdr, off_t offset, argument
295 if (gelf_xlatetom(elf, &dst, &src, ehdr->e_ident[EI_DATA]) == NULL) {
334 is_pie(const char *fname, Elf *elf, GElf_Ehdr *ehdr, off_t offset, size_t len) argument
369 if (gelf_xlatetom(elf, &dst, &src, ehdr->e_ident[EI_DATA]) == NULL) {
393 GElf_Ehdr ehdr; local
418 if (gelf_getehdr(elf, &ehdr) == NULL) {
431 freebsd = ehdr.e_ident[EI_OSABI] == ELFOSABI_FREEBSD;
432 for (i = 0; i < ehdr.e_phnum; i++) {
440 if (ehdr.e_ident[EI_OSABI] == ELFOSABI_NONE && !freebsd)
441 freebsd = has_freebsd_abi_tag(fname, elf, &ehdr,
[all...]
/freebsd-current/contrib/elftoolchain/brandelf/
H A Dbrandelf.c93 GElf_Ehdr ehdr; local
185 if (gelf_getehdr(elf, &ehdr) == NULL) {
194 argv[0], iselftype(ehdr.e_ident[EI_OSABI]),
195 ehdr.e_ident[EI_OSABI]);
216 ehdr.e_ident[EI_OSABI] = (unsigned char) type;
217 if (gelf_update_ehdr(elf, &ehdr) == 0) {
/freebsd-current/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Ddt_link.c467 Elf32_Ehdr ehdr; member in struct:__anon1
488 elf_file.ehdr.e_ident[EI_MAG0] = ELFMAG0;
489 elf_file.ehdr.e_ident[EI_MAG1] = ELFMAG1;
490 elf_file.ehdr.e_ident[EI_MAG2] = ELFMAG2;
491 elf_file.ehdr.e_ident[EI_MAG3] = ELFMAG3;
492 elf_file.ehdr.e_ident[EI_VERSION] = EV_CURRENT;
493 elf_file.ehdr.e_ident[EI_CLASS] = ELFCLASS32;
495 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2MSB;
497 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2LSB;
499 elf_file.ehdr
621 Elf64_Ehdr ehdr; member in struct:__anon2
1197 GElf_Ehdr ehdr; local
[all...]
/freebsd-current/usr.bin/gcore/
H A Delfcore.c469 Elf_Ehdr *ehdr, binhdr; local
481 ehdr = (Elf_Ehdr *)hdr;
483 ehdr->e_ident[EI_MAG0] = ELFMAG0;
484 ehdr->e_ident[EI_MAG1] = ELFMAG1;
485 ehdr->e_ident[EI_MAG2] = ELFMAG2;
486 ehdr->e_ident[EI_MAG3] = ELFMAG3;
487 ehdr->e_ident[EI_CLASS] = ELF_CLASS;
488 ehdr->e_ident[EI_DATA] = ELF_DATA;
489 ehdr->e_ident[EI_VERSION] = EV_CURRENT;
490 ehdr
[all...]
/freebsd-current/usr.sbin/crunch/crunchide/
H A Dexec_elf32.c224 Elf_Ehdr ehdr; local
242 if (xreadatoff(fd, &ehdr, 0, sizeof ehdr, fn) != sizeof ehdr)
245 data = ehdr.e_ident[EI_DATA];
246 shnum = xe16toh(ehdr.e_shnum);
248 shdrsize = shnum * xe16toh(ehdr.e_shentsize);
251 if (xreadatoff(fd, shdrp, xewtoh(ehdr.e_shoff), shdrsize, fn) !=
268 if (i == xe16toh(ehdr.e_shstrndx))
303 shdrshdr.sh_offset = ehdr
[all...]
/freebsd-current/lib/libproc/
H A D_libproc.h53 GElf_Ehdr ehdr; member in struct:file_info
/freebsd-current/sys/x86/xen/
H A Dpv.c274 Elf_Ehdr *ehdr; local
278 ehdr = (Elf_Ehdr *)(&end + 1);
279 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) ||
280 ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS ||
281 ehdr->e_version > 1) {
287 shdr = (Elf_Shdr *)((uint8_t *)ehdr + ehdr->e_shoff);
289 for (i = 1; i < ehdr->e_shnum; i++) {
294 ksymtab = (uintptr_t)((uint8_t *)ehdr + shdr[i].sh_offset);
299 kstrtab = (uintptr_t)((uint8_t *)ehdr
[all...]

Completed in 217 milliseconds

123