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

1 2

  /src/sys/arch/atari/stand/tostools/libtos/
aout.c 83 struct exec ehdr; local in function:aout_load
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 in function:elf_load
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 in function:loadfile
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 in function:loadfile
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/sys/arch/pmax/stand/common/
bootxx.c 138 Elf32_Ehdr ehdr; local in function:loadfile
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 in function:NAME
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/sun3/sun3x/
locore2.c 98 Elf_Ehdr *ehdr; local in function:_save_symtab
106 ehdr = (void *)end;
107 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 ||
108 ehdr->e_ident[EI_CLASS] != ELFCLASS32) {
119 shp = (Elf_Shdr *)(end + ehdr->e_shoff);
120 for (i = 0; i < ehdr->e_shnum; i++) {
130 ssym = (char *)ehdr;
  /src/sys/arch/epoc32/stand/e32boot/exe/
netbsd.cpp 94 Elf32_Ehdr ehdr; local in function:ELF::ParseHeader
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/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 in function:exec_multiboot1
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/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 in function:xk_load
264 ehdr = buf;
292 if (*(u_int32_t *)&ehdr->e_ident[EI_MAG0] !
    [all...]
execkern.h 42 Elf32_Ehdr ehdr; /* saved ELF header */ member in struct:execkern_arg
  /src/usr.sbin/installboot/arch/
pmax.c 315 Elf32_Ehdr ehdr; local in function:load_bootstrap
319 if ((pread(params->s1fd, &ehdr, sizeof(ehdr), 0)) != sizeof(ehdr)) {
323 if ((memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) ||
324 (ehdr.e_ident[EI_CLASS] != ELFCLASS32)) {
332 for (i = 0; i < le16toh(ehdr.e_phnum); i++) {
334 (off_t) le32toh(ehdr.e_phoff) + i * sizeof(phdr))
355 *execaddr = le32toh(ehdr.e_entry);
  /src/sys/arch/sun2/sun2/
locore2.c 114 Elf_Ehdr *ehdr; local in function:_save_symtab
122 ehdr = (void *)end;
123 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 ||
124 ehdr->e_ident[EI_CLASS] != ELFCLASS32) {
135 shp = (Elf_Shdr *)(end + ehdr->e_shoff);
136 for (i = 0; i < ehdr->e_shnum; i++) {
147 ssym = (char *)ehdr;
  /src/sys/arch/sun3/sun3/
locore2.c 118 Elf_Ehdr *ehdr; local in function:_save_symtab
126 ehdr = (void *)end;
127 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 ||
128 ehdr->e_ident[EI_CLASS] != ELFCLASS32) {
139 shp = (Elf_Shdr *)(end + ehdr->e_shoff);
140 for (i = 0; i < ehdr->e_shnum; i++) {
164 ssym = (char *)ehdr;
  /src/lib/libc/gen/
nlist_elf32.c 80 Elf_Ehdr ehdr; local in function:ELFNAMEEND
124 if ((ssize_t)(i = pread(fd, &ehdr, sizeof(Elf_Ehdr), (off_t)0)) == -1)
132 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 ||
133 ehdr.e_ident[EI_CLASS] != ELFCLASS)
136 switch (ehdr.e_machine) {
  /src/sys/arch/pmax/stand/smallnet/setnetimage/
setnetimage.c 85 Elf32_Ehdr ehdr; local in function:main
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/sys/arch/x86/x86/
cpu_ucode_intel.c 114 struct intel1_ucode_ext_table *ehdr; local in function:cpu_ucode_intel_verify
159 ehdr = (struct intel1_ucode_ext_table *)
165 ehdr->uet_count;
168 p = (uint32_t *)ehdr;
  /src/usr.bin/crunch/crunchide/
exec_elf32.c 178 Elf_Ehdr ehdr; local in function:ELFNAMEEND
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/lib/libexecinfo/
symtab.c 97 GElf_Ehdr ehdr; local in function:symtab_create
115 if (gelf_getehdr(elf, &ehdr) == NULL) {
116 warnx("Error getting ELF Ehdr");
121 st->ispie = ehdr.e_type == ET_DYN;
  /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 in function:elf_get_head_size
280 ehdr = (Elf_Ehdr *)headva
    [all...]
  /src/sys/arch/i386/i386/
multiboot.c 697 Elf32_Ehdr ehdr; local in function:multiboot1_ksyms_addsyms_elf
701 memcpy(ehdr.e_ident, ELFMAG, SELFMAG);
702 ehdr.e_ident[EI_CLASS] = ELFCLASS32;
703 ehdr.e_ident[EI_DATA] = ELFDATA2LSB;
704 ehdr.e_ident[EI_VERSION] = EV_CURRENT;
705 ehdr.e_type = ET_EXEC;
706 ehdr.e_machine = EM_386;
707 ehdr.e_version = 1;
708 ehdr.e_ehsize = sizeof(ehdr);
    [all...]
  /src/sys/kern/
core_elf32.c 114 Elf_Ehdr ehdr; local in function:ELFNAMEEND
159 memset(&ehdr.e_ident[EI_PAD], 0, sizeof(ehdr.e_ident) - EI_PAD);
160 memcpy(ehdr.e_ident, ELFMAG, SELFMAG);
162 ehdr.e_ident[EI_CLASS] = ELFCLASS32;
164 ehdr.e_ident[EI_CLASS] = ELFCLASS64;
166 ehdr.e_ident[EI_DATA] = ELFDEFNNAME(MACHDEP_ENDIANNESS);
167 ehdr.e_ident[EI_VERSION] = EV_CURRENT;
172 ehdr.e_ident[EI_OSABI] = ELFOSABI_SYSV;
173 ehdr.e_ident[EI_ABIVERSION] = 0
    [all...]
  /src/sys/arch/next68k/next68k/
nextrom.c 141 Elf_Ehdr *ehdr; local in function:next68k_bootargs
164 ehdr = (void *)reloc_end;
167 if (ehdr->e_ident[i] != reloc_elfmag[i]) {
172 if (ehdr->e_ident[EI_CLASS] != ELFCLASS32) {
183 shp = (Elf_Shdr *)(reloc_end + ehdr->e_shoff);
184 for (i = 0; i < ehdr->e_shnum; i++) {
  /src/libexec/ld.elf_so/
map_object.c 68 Elf_Ehdr *ehdr; local in function:_rtld_map_object
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/rump/librump/rumpkern/
rump.c 678 Elf64_Ehdr ehdr; local in function:rump_kernelfsym_load
688 memset(&ehdr, 0, sizeof(ehdr));
689 ksyms_addsyms_explicit(&ehdr, symtab, symsize, strtab, strsize);

Completed in 24 milliseconds

1 2