HomeSort by: relevance | last modified time | path
    Searched refs:ehdr (Results 1 - 25 of 125) sorted by relevancy

1 2 3 4 5

  /src/sys/arch/atari/stand/tostools/libtos/
aout.c 83 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.a_bss
    [all...]
elf.c 72 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.e_shoff
    [all...]
  /src/sys/arch/emips/stand/common/
bootxx.c 116 Elf32_Ehdr ehdr; local
147 i = read(fd, (char *)&ehdr, sizeof(ehdr));
148 if ((i != sizeof(ehdr)) ||
149 (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) ||
150 (ehdr.e_ident[EI_CLASS] != ELFCLASS32)) {
155 for (i = 0; i < ehdr.e_phnum; i++) {
156 if (lseek(fd, (off_t) ehdr.e_phoff + i * sizeof(phdr), 0) < 0)
167 return ((entrypt*)ehdr.e_entry);
  /src/sys/arch/mipsco/stand/common/
bootxx.c 120 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);
  /src/external/gpl3/gdb.old/dist/gdb/testsuite/gdb.base/
sym-file-loader.c 72 Elf_External_Ehdr *ehdr; member in struct:library
76 static Elf_External_Shdr *find_shdr (Elf_External_Ehdr *ehdr,
218 Elf_External_Ehdr *ehdr; local
268 ehdr = (Elf_External_Ehdr *) addr;
269 if (ehdr->e_ident[EI_MAG0] != ELFMAG0
270 || ehdr->e_ident[EI_MAG1] != ELFMAG1
271 || ehdr->e_ident[EI_MAG2] != ELFMAG2
272 || ehdr->e_ident[EI_MAG3] != ELFMAG3)
274 printf ("Not an ELF file: %x\n", ehdr->e_ident[EI_MAG0]);
278 if (ehdr->e_ident[EI_CLASS] == ELFCLASS32
489 Elf_External_Ehdr *ehdr = lib->ehdr; local
    [all...]
  /src/external/gpl3/gdb/dist/gdb/testsuite/gdb.base/
sym-file-loader.c 72 Elf_External_Ehdr *ehdr; member in struct:library
76 static Elf_External_Shdr *find_shdr (Elf_External_Ehdr *ehdr,
218 Elf_External_Ehdr *ehdr; local
268 ehdr = (Elf_External_Ehdr *) addr;
269 if (ehdr->e_ident[EI_MAG0] != ELFMAG0
270 || ehdr->e_ident[EI_MAG1] != ELFMAG1
271 || ehdr->e_ident[EI_MAG2] != ELFMAG2
272 || ehdr->e_ident[EI_MAG3] != ELFMAG3)
274 printf ("Not an ELF file: %x\n", ehdr->e_ident[EI_MAG0]);
278 if (ehdr->e_ident[EI_CLASS] == ELFCLASS32
489 Elf_External_Ehdr *ehdr = lib->ehdr; local
    [all...]
  /src/sys/arch/amd64/stand/prekern/
elf.c 37 Elf_Ehdr *ehdr; member in struct:elfinfo
55 if (memcmp((char *)eif.ehdr->e_ident, ELFMAG, SELFMAG) != 0 ||
56 eif.ehdr->e_ident[EI_CLASS] != ELFCLASS ||
57 eif.ehdr->e_type != ET_REL) {
129 for (i = 0; i < eif.ehdr->e_shnum; i++) {
166 return (uintptr_t)((uint8_t *)eif.ehdr +
175 return (uintptr_t)((uint8_t *)eif.ehdr +
181 if (sym->st_shndx >= eif.ehdr->e_shnum) {
276 Elf_Ehdr *ehdr; local
280 ehdr = (Elf_Ehdr *)headva
    [all...]
  /src/external/bsd/elftoolchain/dist/libelf/
libelf_ehdr.c 118 void *ehdr; local
146 ehdr = (void *) e->e_u.e_elf.e_ehdr.e_ehdr32;
148 ehdr = (void *) e->e_u.e_elf.e_ehdr.e_ehdr64;
150 if (ehdr != NULL) /* already have a translated ehdr */
151 return (ehdr);
164 if ((ehdr = calloc((size_t) 1, msz)) == NULL) {
170 e->e_u.e_elf.e_ehdr.e_ehdr32 = ehdr;
171 EHDR_INIT(ehdr,32);
173 e->e_u.e_elf.e_ehdr.e_ehdr64 = ehdr;
    [all...]
elf_scn.c 54 _libelf_load_section_headers(Elf *e, void *ehdr)
67 assert(ehdr != NULL);
88 eh32 = (Elf32_Ehdr *) ehdr;
92 eh64 = (Elf64_Ehdr *) ehdr;
144 void *ehdr; local
154 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
159 _libelf_load_section_headers(e, ehdr) == 0)
183 void *ehdr; local
197 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
212 _libelf_load_section_headers(e, ehdr) == 0
    [all...]
  /src/sys/arch/pmax/stand/common/
bootxx.c 138 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);
  /src/usr.sbin/lockstat/
elf32.c 103 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.e_shnum || symhdr.sh_offset == 0
    [all...]
  /src/sys/arch/x68k/stand/common/
exec_sub.c 161 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->e_ident[EI_MAG0] !
    [all...]
  /src/sys/arch/epoc32/stand/e32boot/exe/
netbsd.cpp 94 Elf32_Ehdr ehdr; local
98 Mem::Copy(&ehdr, Buffer, sizeof(ehdr));
99 PhdrSize = sizeof(Elf32_Phdr) * ehdr.e_phnum;
101 Mem::Copy(phdr, Buffer + ehdr.e_phoff, PhdrSize);
103 for (i = 0; i < ehdr.e_phnum; i++) {
118 EntryPoint = ehdr.e_entry;
  /src/sys/arch/sun3/sun3x/
locore2.c 95 Elf_Ehdr *ehdr; local
103 ehdr = (void *)end;
104 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 ||
105 ehdr->e_ident[EI_CLASS] != ELFCLASS32) {
116 shp = (Elf_Shdr *)(end + ehdr->e_shoff);
117 for (i = 0; i < ehdr->e_shnum; i++) {
127 ssym = (char *)ehdr;
  /src/sys/arch/i386/stand/lib/
exec_multiboot1.c 46 ksyms_addr_set(void *ehdr, void *shdr, void *symbase)
54 class = ((Elf_Ehdr *)ehdr)->e_ident[EI_CLASS];
58 ehdr32 = (Elf32_Ehdr *)ehdr;
62 ehdr64 = (Elf64_Ehdr *)ehdr;
163 Elf32_Ehdr ehdr; local
168 pvbcopy((void *)mbp->mbp_marks[MARK_SYM], &ehdr, sizeof(ehdr));
170 if (memcmp(&ehdr.e_ident, ELFMAG, SELFMAG) != 0)
173 shaddr = mbp->mbp_marks[MARK_SYM] + ehdr.e_shoff;
175 shlen = ehdr.e_shnum * ehdr.e_shentsize
    [all...]
  /src/sys/kern/
core_elf32.c 117 Elf_Ehdr ehdr; local
162 memset(&ehdr.e_ident[EI_PAD], 0, sizeof(ehdr.e_ident) - EI_PAD);
163 memcpy(ehdr.e_ident, ELFMAG, SELFMAG);
165 ehdr.e_ident[EI_CLASS] = ELFCLASS32;
167 ehdr.e_ident[EI_CLASS] = ELFCLASS64;
169 ehdr.e_ident[EI_DATA] = ELFDEFNNAME(MACHDEP_ENDIANNESS);
170 ehdr.e_ident[EI_VERSION] = EV_CURRENT;
175 ehdr.e_ident[EI_OSABI] = ELFOSABI_SYSV;
176 ehdr.e_ident[EI_ABIVERSION] = 0
    [all...]
  /src/sys/lib/libsa/
loadfile_elf32.c 89 internalize_ehdr(Elf_Byte bo, Elf_Ehdr *ehdr)
93 I16(ehdr->e_type);
94 I16(ehdr->e_machine);
95 I32(ehdr->e_version);
96 I32(ehdr->e_entry);
97 I32(ehdr->e_phoff);
98 I32(ehdr->e_shoff);
99 I32(ehdr->e_flags);
100 I16(ehdr->e_ehsize);
101 I16(ehdr->e_phentsize)
    [all...]
  /src/libexec/ld.elf_so/arch/powerpc/
fixup.c 121 _rtld_espresso_fixup(const char *path, int fd, Elf_Ehdr *ehdr, Elf_Phdr *phdr,
128 if (_rtld_ncpus == 1 || ehdr->e_shnum == 0 ||
133 shdr_size = (size_t)ehdr->e_shentsize * ehdr->e_shnum;
135 ehdr->e_shoff);
142 for (i = 0; i < ehdr->e_shnum; i++) {
174 _rtld_map_segment_fixup(const char *path, int fd, Elf_Ehdr *ehdr,
196 return _rtld_espresso_fixup(path, fd, ehdr, phdr, data_addr,
  /src/external/cddl/osnet/dist/tools/ctf/cvt/
util.c 71 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]);
  /src/libexec/ld.elf_so/
map_object.c 68 Elf_Ehdr *ehdr; local
127 ehdr = mmap(NULL, _rtld_pagesz, PROT_READ, MAP_FILE | MAP_SHARED, fd,
129 obj->ehdr = ehdr;
130 if (ehdr == MAP_FAILED) {
135 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0) {
139 if (ehdr->e_ident[EI_CLASS] != ELFCLASS) {
141 ehdr->e_ident[EI_CLASS], ELFCLASS);
145 if (ehdr->e_ident[EI_VERSION] != EV_CURRENT ||
146 ehdr->e_version != EV_CURRENT |
    [all...]
  /src/sys/arch/sun2/sun2/
locore2.c 106 Elf_Ehdr *ehdr; local
114 ehdr = (void *)end;
115 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 ||
116 ehdr->e_ident[EI_CLASS] != ELFCLASS32) {
127 shp = (Elf_Shdr *)(end + ehdr->e_shoff);
128 for (i = 0; i < ehdr->e_shnum; i++) {
139 ssym = (char *)ehdr;
  /src/sys/arch/sun3/sun3/
locore2.c 109 Elf_Ehdr *ehdr; local
117 ehdr = (void *)end;
118 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 ||
119 ehdr->e_ident[EI_CLASS] != ELFCLASS32) {
130 shp = (Elf_Shdr *)(end + ehdr->e_shoff);
131 for (i = 0; i < ehdr->e_shnum; i++) {
155 ssym = (char *)ehdr;
  /src/sys/arch/pmax/stand/smallnet/setnetimage/
setnetimage.c 85 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.e_entry
    [all...]
  /src/usr.bin/crunch/crunchide/
exec_elf32.c 178 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.e_shoff, shdrsize, fn) != shdrsize
    [all...]
  /src/usr.sbin/mopd/common/
file.c 430 Elf32_Ehdr ehdr;
434 if (read(fd, (char *)&ehdr, sizeof(ehdr)) != sizeof(ehdr))
437 if (ehdr.e_ident[0] != ELFMAG0 ||
438 ehdr.e_ident[1] != ELFMAG1 ||
439 ehdr.e_ident[2] != ELFMAG2 ||
440 ehdr.e_ident[3] != ELFMAG3)
444 if (ehdr.e_ident[EI_CLASS] != ELFCLASS32)
457 Elf32_Ehdr ehdr;
    [all...]

Completed in 25 milliseconds

1 2 3 4 5