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

12

/openbsd-current/libexec/ld.so/ldd/
H A Dldd.c100 Elf_Ehdr ehdr; local
125 if (read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr)) {
131 if (!IS_ELF(ehdr) || ehdr.e_machine != ELF_TARG_MACH) {
137 if (ehdr.e_phnum == 0 || ehdr.e_phentsize == 0) {
143 if ((phdr = reallocarray(NULL, ehdr.e_phnum, sizeof(Elf_Phdr))) == NULL)
145 size = ehdr
[all...]
/openbsd-current/lib/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.c45 _libelf_load_section_headers(Elf *e, void *ehdr) argument
57 assert(ehdr != NULL);
78 eh32 = (Elf32_Ehdr *) ehdr;
82 eh64 = (Elf64_Ehdr *) ehdr;
135 void *ehdr; local
144 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
149 _libelf_load_section_headers(e, ehdr) == 0)
174 void *ehdr; local
187 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
202 _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.c516 void *ehdr, *phdr; local
529 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
532 eh32 = ehdr;
533 eh64 = ehdr;
604 ehdr))
650 _libelf_load_section_headers(e, ehdr) == 0)
693 _libelf_setphnum(e, ehdr, ec, phnum);
694 _libelf_setshnum(e, ehdr, ec, shnum);
848 void *ehdr; local
857 ehdr
892 void *ehdr; local
954 void *ehdr; local
[all...]
H A Dgelf_phdr.c127 void *ehdr; local
143 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
/openbsd-current/lib/libc/gen/
H A Dnlist.c53 * __elf_is_okay__ - Determine if ehdr really
60 __elf_is_okay__(Elf_Ehdr *ehdr) argument
69 if (IS_ELF(*ehdr) &&
70 ehdr->e_ident[EI_CLASS] == ELF_TARG_CLASS &&
71 ehdr->e_ident[EI_DATA] == ELF_TARG_DATA &&
72 ehdr->e_ident[EI_VERSION] == ELF_TARG_VER) {
75 if (ehdr->e_machine == ELF_TARG_MACH &&
76 ehdr->e_version == ELF_TARG_VER)
80 if (ehdr->e_shentsize != sizeof(Elf_Shdr))
96 Elf_Ehdr ehdr; local
[all...]
/openbsd-current/usr.sbin/installboot/
H A Di386_nlist.c49 static int __elf_is_okay__(Elf_Ehdr *ehdr);
56 * __elf_is_okay__ - Determine if ehdr really
63 __elf_is_okay__(Elf_Ehdr *ehdr) argument
79 if (IS_ELF(*ehdr) &&
80 ehdr->e_ident[EI_CLASS] == ELFCLASS32 &&
81 ehdr->e_ident[EI_DATA] == ELF_TARG_DATA &&
82 ehdr->e_ident[EI_VERSION] == ELF_TARG_VER) {
85 if (ehdr->e_machine == EM_386 &&
86 ehdr->e_version == ELF_TARG_VER)
103 Elf_Ehdr ehdr; local
[all...]
/openbsd-current/usr.sbin/mopd/common/
H A Dfile.c473 Elf32_Ehdr ehdr;
477 if (read(fd, (char *)&ehdr, sizeof(ehdr)) != sizeof(ehdr))
480 if (ehdr.e_ident[0] != ELFMAG0 ||
481 ehdr.e_ident[1] != ELFMAG1 ||
482 ehdr.e_ident[2] != ELFMAG2 ||
483 ehdr.e_ident[3] != ELFMAG3)
487 if (ehdr.e_ident[EI_CLASS] != ELFCLASS32 &&
488 ehdr
[all...]
/openbsd-current/sys/ddb/
H A Ddb_dwarf.c469 Elf_Ehdr ehdr; local
470 memcpy(&ehdr, p, sizeof(ehdr));
471 if (!IS_ELF(ehdr))
473 if (ehdr.e_ident[EI_CLASS] != ELFCLASS)
475 if (ehdr.e_ident[EI_DATA] != ELFDATA)
477 if (ehdr.e_shoff > filesize)
479 if (ehdr.e_shentsize < sizeof(Elf_Shdr))
481 if (ehdr.e_shnum > (filesize - ehdr
[all...]
/openbsd-current/libexec/ld.so/
H A Dlibrary.c111 Elf_Ehdr *ehdr; local
145 ehdr = (Elf_Ehdr *)hbuf;
146 if (ehdr->e_ident[0] != ELFMAG0 || ehdr->e_ident[1] != ELFMAG1 ||
147 ehdr->e_ident[2] != ELFMAG2 || ehdr->e_ident[3] != ELFMAG3 ||
148 ehdr->e_type != ET_DYN || ehdr->e_machine != MACHID) {
161 phdp = (Elf_Phdr *)(hbuf + ehdr->e_phoff);
162 for (i = 0; i < ehdr
[all...]
H A Dlibrary_mquery.c109 Elf_Ehdr *ehdr; local
148 ehdr = (Elf_Ehdr *)hbuf;
149 if (ehdr->e_ident[0] != ELFMAG0 || ehdr->e_ident[1] != ELFMAG1 ||
150 ehdr->e_ident[2] != ELFMAG2 || ehdr->e_ident[3] != ELFMAG3 ||
151 ehdr->e_type != ET_DYN || ehdr->e_machine != MACHID) {
171 phdp = (Elf_Phdr *)(hbuf + ehdr->e_phoff);
172 for (i = 0; i < ehdr
[all...]
/openbsd-current/usr.sbin/mkuboot/
H A Dcopy_elf.c53 Elf_Ehdr ehdr, elf; local
60 nbytes = read(ifd, &ehdr, sizeof ehdr);
63 if (nbytes != sizeof ehdr)
66 elf = ehdr;
83 for (i = 0; i < letoh16(ehdr.e_phnum); i++) {
84 if (lseek(ifd, elfoff2h(ehdr.e_phoff) + i *
85 letoh16(ehdr.e_phentsize), SEEK_SET) == (off_t)-1)
129 for (i = 0; i < letoh16(ehdr.e_phnum); i++) {
131 fprintf(stderr, "phdr %d/%d\n", i, letoh16(ehdr
[all...]
H A Dmkuboot.c287 Elf_Ehdr ehdr; local
289 nbytes = read(ifd, &ehdr, sizeof ehdr);
295 if (nbytes != sizeof ehdr || !IS_ELF(ehdr))
298 if (ehdr.e_ident[EI_CLASS] == ELFCLASS32)
300 else if (ehdr.e_ident[EI_CLASS] == ELFCLASS64)
/openbsd-current/usr.sbin/tcpdump/
H A Dprint-fddi.c262 struct ether_header ehdr; local
273 extract_fddi_addrs(fddip, (char *)ESRC(&ehdr), (char *)EDST(&ehdr));
286 packetp = (u_char *)&ehdr;
289 fddi_print(fddip, length, ESRC(&ehdr), EDST(&ehdr));
300 if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr))
308 ESRC(&ehdr), EDST(&ehdr));
[all...]
/openbsd-current/usr.sbin/crunchgen/
H A Delf_hide.c57 void hide_sym(Elf_Ehdr * ehdr, Elf_Shdr * symsect,
59 void reorder_syms(Elf_Ehdr * ehdr, Elf_Shdr * symsect,
62 void renum_reloc_syms(Elf_Ehdr * ehdr, Symmap * symmap,
305 hide_sym(Elf_Ehdr * ehdr, Elf_Shdr * symsect, argument
336 reorder_syms(ehdr, symsect, symtab, symtabsize, symtabsecnum);
340 reorder_syms(Elf_Ehdr * ehdr, Elf_Shdr * symsect, argument
390 renum_reloc_syms(ehdr, symmap, symtabsecnum);
396 renum_reloc_syms(Elf_Ehdr * ehdr, Symmap * symmap, int symtabsecnum) argument
405 for (i = 0; i < ehdr->e_shnum; i++) {
406 pshdr = (Elf_Shdr *) (pexe + ehdr
[all...]
/openbsd-current/sys/kern/
H A Dexec_elf.c131 elf_check_header(Elf_Ehdr *ehdr) argument
138 if (!IS_ELF(*ehdr) ||
139 ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS ||
140 ehdr->e_ident[EI_DATA] != ELF_TARG_DATA ||
141 ehdr->e_ident[EI_VERSION] != ELF_TARG_VER)
145 if (ehdr->e_machine != ELF_TARG_MACH ||
146 ehdr->e_version != ELF_TARG_VER)
150 if (ehdr->e_phnum > ELF_MAX_VALID_PHDR)
1251 Elf_Ehdr ehdr; local
1265 memset(&ehdr,
[all...]
/openbsd-current/sys/dev/pci/drm/apple/
H A Dafk.c399 u32 type, struct epic_hdr *ehdr,
466 struct epic_hdr *ehdr = (struct epic_hdr *)data; local
468 (struct epic_sub_hdr *)(data + sizeof(*ehdr));
470 u8 *payload = data + sizeof(*ehdr) + sizeof(*eshdr);
473 if (data_size < sizeof(*ehdr) + sizeof(*eshdr)) {
478 payload_size = data_size - sizeof(*ehdr) - sizeof(*eshdr);
480 trace_afk_recv_handle(ep, channel, type, data_size, ehdr, eshdr);
530 ep, channel, type, ehdr, eshdr, payload, payload_size);
700 struct epic_hdr *ehdr; local
712 total_epic_size = sizeof(*ehdr)
398 afk_recv_handle_std_service(struct apple_dcp_afkep *ep, u32 channel, u32 type, struct epic_hdr *ehdr, struct epic_sub_hdr *eshdr, void *payload, size_t payload_size) argument
[all...]
/openbsd-current/usr.sbin/npppd/pppoe/
H A Dpppoe_session.c96 memcpy(_this->ehdr.ether_dhost, ether_addr, ETHER_ADDR_LEN);
97 memcpy(_this->ehdr.ether_shost, pppoe_session_sock_ether_addr(_this),
199 iov[niov].iov_base = &_this->ehdr;
200 iov[niov++].iov_len = sizeof(_this->ehdr);
203 _this->ehdr.ether_type = htons(ETHERTYPE_PPPOEDISC);
210 _this->ehdr.ether_type = htons(ETHERTYPE_PPPOE);
H A Dpppoe.h170 struct ether_header ehdr; member in struct:_pppoe_session
/openbsd-current/sys/arch/i386/i386/
H A Ducode.c386 struct intel_ucode_ext_sig_header *ehdr; local
413 ehdr = (void *)((char *)hdr + sizeof(struct intel_ucode_header) +
415 esig = (void *)&ehdr[1];
416 for (i = 0; i < ehdr->ext_sig_count; i++) {
/openbsd-current/sys/arch/amd64/amd64/
H A Ducode.c363 struct intel_ucode_ext_sig_header *ehdr; local
390 ehdr = (void *)((char *)hdr + sizeof(struct intel_ucode_header) +
392 esig = (void *)&ehdr[1];
393 for (i = 0; i < ehdr->ext_sig_count; i++) {
/openbsd-current/usr.sbin/snmpd/
H A Dsnmpe.c827 struct ber_element *ehdr; local
831 if ((ehdr = ober_add_integer(msg->sm_resp, msg->sm_version)) == NULL)
836 if ((ehdr = ober_printf_elements(ehdr, "{iixi}", msg->sm_msgid,
842 if ((ehdr = usm_encode(msg, ehdr)) == NULL)
845 if ((ehdr = ober_add_string(ehdr, msg->sm_community)) == NULL)
869 ober_link_elements(ehdr, pdu);

Completed in 406 milliseconds

12