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

123

/netbsd-6-1-5-RELEASE/sys/arch/atari/stand/tostools/libtos/
H A Daout.c83 struct exec ehdr; local
89 if (read(fd, (char *)&ehdr, sizeof(ehdr)) != sizeof(ehdr))
93 if ((ehdr.a_magic & 0xffff) != NMAGIC)
96 if ((N_GETMAGIC(ehdr) != NMAGIC) && (N_GETMAGIC(ehdr) != OMAGIC))
103 textsz = (ehdr.a_text + AOUT_LDPGSZ - 1) & ~(AOUT_LDPGSZ - 1);
105 od->ksize = textsz + ehdr.a_data + ehdr
[all...]
H A Delf.c72 Elf32_Ehdr ehdr; local
79 if (read(fd, (char *)&ehdr, sizeof(ehdr)) != sizeof(ehdr))
82 memcpy(&ident, ehdr.e_ident, sizeof ident);
89 i = ehdr.e_phnum * sizeof(Elf32_Phdr);
98 for (i = 0; i < ehdr.e_phnum; i++) {
114 i = ehdr.e_shnum + 1;
116 if (lseek(fd, (off_t)ehdr.e_shoff, SEEK_SET) != ehdr
[all...]
/netbsd-6-1-5-RELEASE/external/bsd/tcpdump/dist/
H A Dprint-ipfc.c89 struct ether_header ehdr; local
99 extract_ipfc_addrs(ipfcp, (char *)ESRC(&ehdr), (char *)EDST(&ehdr));
102 ipfc_hdr_print(ipfcp, length, ESRC(&ehdr), EDST(&ehdr));
110 if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr),
118 ESRC(&ehdr), EDST(&ehdr));
H A Dprint-token.c111 struct ether_header ehdr; local
125 extract_token_addrs(trp, (char*)ESRC(&ehdr), (char*)EDST(&ehdr));
130 *ESRC(&ehdr) &= 0x7f;
133 token_hdr_print(trp, length, ESRC(&ehdr), EDST(&ehdr));
161 token_hdr_print(trp, length, ESRC(&ehdr), EDST(&ehdr));
172 if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr),
[all...]
H A Dprint-fddi.c250 struct ether_header ehdr; local
261 extract_fddi_addrs(fddip, (char *)ESRC(&ehdr), (char *)EDST(&ehdr));
264 fddi_hdr_print(fddip, length, ESRC(&ehdr), EDST(&ehdr));
274 if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr),
282 ESRC(&ehdr), EDST(&ehdr));
295 fddi_hdr_print(fddip, length + FDDI_HDRLEN, ESRC(&ehdr),
[all...]
/netbsd-6-1-5-RELEASE/sys/arch/mipsco/stand/common/
H A Dbootxx.c120 Elf32_Ehdr ehdr; local
137 i = read(fd, (char *)&ehdr, sizeof(ehdr));
138 if ((i != sizeof(ehdr)) ||
139 (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) ||
140 (ehdr.e_ident[EI_CLASS] != ELFCLASS32)) {
145 for (i = 0; i < ehdr.e_phnum; i++) {
146 if (lseek(fd, (off_t) ehdr.e_phoff + i * sizeof(phdr), 0) < 0)
157 return ((entrypt)ehdr.e_entry);
/netbsd-6-1-5-RELEASE/sys/arch/emips/stand/common/
H A Dbootxx.c123 Elf32_Ehdr ehdr; local
154 i = read(fd, (char *)&ehdr, sizeof(ehdr));
155 if ((i != sizeof(ehdr)) ||
156 (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) ||
157 (ehdr.e_ident[EI_CLASS] != ELFCLASS32)) {
162 for (i = 0; i < ehdr.e_phnum; i++) {
163 if (lseek(fd, (off_t) ehdr.e_phoff + i * sizeof(phdr), 0) < 0)
174 return ((entrypt*)ehdr.e_entry);
/netbsd-6-1-5-RELEASE/sys/lib/libsa/
H A Dloadfile_elf32.c83 internalize_ehdr(Elf_Byte bo, Elf_Ehdr *ehdr) argument
87 I16(ehdr->e_type);
88 I16(ehdr->e_machine);
89 I32(ehdr->e_version);
90 I32(ehdr->e_entry);
91 I32(ehdr->e_phoff);
92 I32(ehdr->e_shoff);
93 I32(ehdr->e_flags);
94 I16(ehdr->e_ehsize);
95 I16(ehdr
120 externalize_ehdr(Elf_Byte bo, Elf_Ehdr *ehdr) argument
[all...]
/netbsd-6-1-5-RELEASE/external/bsd/libelf/dist/
H A Dlibelf_ehdr.c121 void *ehdr; local
148 ehdr = (void *) e->e_u.e_elf.e_ehdr.e_ehdr32;
150 ehdr = (void *) e->e_u.e_elf.e_ehdr.e_ehdr64;
152 if (ehdr != NULL) /* already have a translated ehdr */
153 return (ehdr);
167 if ((ehdr = calloc((size_t) 1, msz)) == NULL) {
173 e->e_u.e_elf.e_ehdr.e_ehdr32 = ehdr;
174 EHDR_INIT(ehdr,32);
176 e->e_u.e_elf.e_ehdr.e_ehdr64 = ehdr;
[all...]
H A Delf_scn.c50 _libelf_load_scn(Elf *e, void *ehdr) argument
62 assert(ehdr != NULL);
80 eh32 = (Elf32_Ehdr *) ehdr;
84 eh64 = (Elf64_Ehdr *) ehdr;
139 void *ehdr; local
148 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
153 _libelf_load_scn(e, ehdr) == 0)
178 void *ehdr; local
191 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
206 _libelf_load_scn(e, ehdr)
[all...]
/netbsd-6-1-5-RELEASE/sys/arch/pmax/stand/common/
H A Dbootxx.c138 Elf32_Ehdr ehdr; local
169 i = read(fd, (char *)&ehdr, sizeof(ehdr));
170 if ((i != sizeof(ehdr)) ||
171 (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) ||
172 (ehdr.e_ident[EI_CLASS] != ELFCLASS32)) {
177 for (i = 0; i < ehdr.e_phnum; i++) {
178 if (lseek(fd, (off_t) ehdr.e_phoff + i * sizeof(phdr), 0) < 0)
189 return ((entrypt)ehdr.e_entry);
/netbsd-6-1-5-RELEASE/external/gpl3/binutils/dist/gold/
H A Dtarget.cc72 const elfcpp::Ehdr<size, big_endian>& ehdr)
74 int et = ehdr.get_e_type();
78 new Sized_relobj<size, big_endian>(name, input_file, offset, ehdr);
85 new Sized_dynobj<size, big_endian>(name, input_file, offset, ehdr);
104 off_t offset, const elfcpp::Ehdr<32, false>& ehdr)
107 offset, ehdr);
114 off_t offset, const elfcpp::Ehdr<32, true>& ehdr)
117 offset, ehdr);
124 off_t offset, const elfcpp::Ehdr<64, false>& ehdr)
127 offset, ehdr);
68 do_make_elf_object_implementation( const std::string& name, Input_file* input_file, off_t offset, const elfcpp::Ehdr<size, big_endian>& ehdr) argument
103 do_make_elf_object(const std::string& name, Input_file* input_file, off_t offset, const elfcpp::Ehdr<32, false>& ehdr) argument
113 do_make_elf_object(const std::string& name, Input_file* input_file, off_t offset, const elfcpp::Ehdr<32, true>& ehdr) argument
123 do_make_elf_object(const std::string& name, Input_file* input_file, off_t offset, const elfcpp::Ehdr<64, false>& ehdr) argument
133 do_make_elf_object(const std::string& name, Input_file* input_file, off_t offset, const elfcpp::Ehdr<64, true>& ehdr) argument
[all...]
/netbsd-6-1-5-RELEASE/libexec/ld.elf_so/
H A Dmap_object.c67 Elf_Ehdr *ehdr; local
120 ehdr = mmap(NULL, _rtld_pagesz, PROT_READ, MAP_FILE | MAP_SHARED, fd,
122 obj->ehdr = ehdr;
123 if (ehdr == MAP_FAILED) {
128 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 ||
129 ehdr->e_ident[EI_CLASS] != ELFCLASS) {
131 ehdr->e_ident[EI_CLASS], ELFCLASS);
135 if (ehdr->e_ident[EI_VERSION] != EV_CURRENT ||
136 ehdr
[all...]
/netbsd-6-1-5-RELEASE/usr.sbin/lockstat/
H A Delf32.c103 Elf_Ehdr ehdr; local
111 if (pread(fd, &ehdr, sizeof(ehdr), 0) != sizeof(ehdr))
114 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 ||
115 ehdr.e_ident[EI_CLASS] != ELFCLASS)
118 switch (ehdr.e_machine) {
128 off = ehdr.e_shoff;
129 for (i = 0; i < ehdr.e_shnum; i++, off += sizeof(symhdr)) {
136 if (i == ehdr
[all...]
/netbsd-6-1-5-RELEASE/sys/arch/x68k/stand/common/
H A Dexec_sub.c161 xarg->ehdr = *hdr;
162 xarg->ehdr.e_shstrndx = 0; /* .shstrtab will be the 1st section */
163 SECTION_NOPAD(sec, "ELF header", &xarg->ehdr, sizeof(Elf32_Ehdr));
181 xarg->ehdr.e_shnum = 0; /* no symbol */
191 xarg->ehdr.e_shnum = 3;
192 xarg->ehdr.e_shoff = sizeof(Elf32_Ehdr);
207 xarg->ehdr.e_shnum++;
252 Elf32_Ehdr *ehdr; local
264 ehdr = buf;
292 if (*(u_int32_t *)&ehdr
[all...]
/netbsd-6-1-5-RELEASE/sys/kern/
H A Dcore_elf32.c105 Elf_Ehdr ehdr; local
142 memset(&ehdr.e_ident[EI_PAD], 0, sizeof(ehdr.e_ident) - EI_PAD);
143 memcpy(ehdr.e_ident, ELFMAG, SELFMAG);
145 ehdr.e_ident[EI_CLASS] = ELFCLASS32;
147 ehdr.e_ident[EI_CLASS] = ELFCLASS64;
149 ehdr.e_ident[EI_DATA] = ELFDEFNNAME(MACHDEP_ENDIANNESS);
150 ehdr.e_ident[EI_VERSION] = EV_CURRENT;
152 ehdr.e_ident[EI_OSABI] = ELFOSABI_SYSV;
153 ehdr
[all...]
/netbsd-6-1-5-RELEASE/sys/arch/sun3/sun3x/
H A Dlocore2.c96 Elf_Ehdr *ehdr; local
104 ehdr = (void *)end;
105 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 ||
106 ehdr->e_ident[EI_CLASS] != ELFCLASS32) {
117 shp = (Elf_Shdr *)(end + ehdr->e_shoff);
118 for (i = 0; i < ehdr->e_shnum; i++) {
128 ssym = (char *)ehdr;
/netbsd-6-1-5-RELEASE/external/cddl/osnet/dist/tools/ctf/cvt/
H A Dutil.c71 GElf_Ehdr ehdr; local
74 if (gelf_getehdr(elf, &ehdr) == NULL)
75 elfterminate(file, "Couldn't read ehdr");
86 if ((name = elf_strptr(elf, ehdr.e_shstrndx,
103 GElf_Ehdr ehdr; local
105 if (gelf_getehdr(elf, &ehdr) == NULL) {
110 if (ehdr.e_ident[EI_CLASS] == ELFCLASS32)
112 else if (ehdr.e_ident[EI_CLASS] == ELFCLASS64)
115 terminate("unknown ELF class %d\n", ehdr.e_ident[EI_CLASS]);
/netbsd-6-1-5-RELEASE/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
/netbsd-6-1-5-RELEASE/sys/arch/sun2/sun2/
H A Dlocore2.c112 Elf_Ehdr *ehdr; local
120 ehdr = (void *)end;
121 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 ||
122 ehdr->e_ident[EI_CLASS] != ELFCLASS32) {
133 shp = (Elf_Shdr *)(end + ehdr->e_shoff);
134 for (i = 0; i < ehdr->e_shnum; i++) {
145 ssym = (char *)ehdr;
/netbsd-6-1-5-RELEASE/sys/arch/sun3/sun3/
H A Dlocore2.c116 Elf_Ehdr *ehdr; local
124 ehdr = (void *)end;
125 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 ||
126 ehdr->e_ident[EI_CLASS] != ELFCLASS32) {
137 shp = (Elf_Shdr *)(end + ehdr->e_shoff);
138 for (i = 0; i < ehdr->e_shnum; i++) {
162 ssym = (char *)ehdr;
/netbsd-6-1-5-RELEASE/sys/arch/pmax/stand/smallnet/setnetimage/
H A Dsetnetimage.c85 Elf32_Ehdr ehdr; local
130 i = read(ifd, (char *)&ehdr, sizeof(ehdr));
131 if ((i != sizeof(ehdr)) ||
132 (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) ||
133 (ehdr.e_ident[EI_CLASS] != ELFCLASS32)) {
139 for (i = 0; i < ehdr.e_phnum; i++) {
140 if (lseek(ifd, (off_t) ehdr.e_phoff + i * sizeof(phdr), 0) < 0)
166 printf("entry point: 0x%08x\n", ehdr.e_entry);
207 NLVAR(X_KERNEL_ENTRY) = ehdr
[all...]
/netbsd-6-1-5-RELEASE/usr.bin/crunch/crunchide/
H A Dexec_elf32.c178 Elf_Ehdr ehdr; local
191 if (xreadatoff(fd, &ehdr, 0, sizeof ehdr, fn) != sizeof ehdr)
194 shdrsize = ehdr.e_shnum * ehdr.e_shentsize;
197 if (xreadatoff(fd, shdrp, ehdr.e_shoff, shdrsize, fn) != shdrsize)
204 for (i = 0; i < ehdr.e_shnum; i++) {
217 if (!weird && strtabsnum != (ehdr.e_shnum - 1)) {
309 if (xwriteatoff(fd, shdrp, ehdr
[all...]
/netbsd-6-1-5-RELEASE/external/gpl3/binutils/usr.sbin/dbsym/
H A Ddbsym.c280 * 16 16 e_ehsize; # sizeof ehdr
294 #define e32_hdr ehdr.e32hdr
295 #define e64_hdr ehdr.e64hdr
343 elf_ehdr ehdr; local
353 if (read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr))
359 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 ||
360 ehdr.e_ident[EI_MAG1] != ELFMAG1 ||
361 ehdr
[all...]
/netbsd-6-1-5-RELEASE/usr.sbin/mopd/common/
H A Dfile.c414 Elf32_Ehdr ehdr;
418 if (read(fd, (char *)&ehdr, sizeof(ehdr)) != sizeof(ehdr))
421 if (ehdr.e_ident[0] != ELFMAG0 ||
422 ehdr.e_ident[1] != ELFMAG1 ||
423 ehdr.e_ident[2] != ELFMAG2 ||
424 ehdr.e_ident[3] != ELFMAG3)
428 if (ehdr.e_ident[EI_CLASS] != ELFCLASS32)
441 Elf32_Ehdr ehdr;
[all...]

Completed in 747 milliseconds

123