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

12345

/external/elfutils/tests/
H A Dupdate1.c38 Elf32_Ehdr *ehdr; local
58 ehdr = elf32_newehdr (elf);
59 if (ehdr == NULL)
69 printf (" %02x", ehdr->e_ident[i]);
74 ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
75 ehdr->e_phoff, ehdr
[all...]
H A Dupdate3.c40 Elf32_Ehdr *ehdr; local
68 ehdr = elf32_newehdr (elf);
69 if (ehdr == NULL)
79 printf (" %02x", ehdr->e_ident[i]);
84 ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
85 ehdr->e_phoff, ehdr
[all...]
H A Dupdate2.c38 Elf32_Ehdr *ehdr; local
59 ehdr = elf32_newehdr (elf);
60 if (ehdr == NULL)
70 printf (" %02x", ehdr->e_ident[i]);
75 ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
76 ehdr->e_phoff, ehdr
[all...]
H A Delfshphehdr.c1 /* Test program for adding section and program headers and ehdr updates.
68 GElf_Ehdr ehdr; local
69 check_elf ("gelf_getehdr", gelf_getehdr (elf, &ehdr) != NULL);
70 check ("e_shnum == 0", ehdr.e_shnum == 0);
71 check ("e_phnum == 0", ehdr.e_phnum == 0);
72 check ("e_shoff == 0", ehdr.e_shoff == 0);
73 check ("e_phoff == 0", ehdr.e_phoff == 0);
84 ehdr.e_ident[EI_DATA] = ELFDATANONE; /* Ask for native encoding. */
85 ehdr.e_type = ET_EXEC;
86 ehdr
[all...]
H A Dnewfile.c26 print_ehdr (Elf32_Ehdr *ehdr) argument
31 printf (" %02x", ehdr->e_ident[n]);
37 ehdr->e_type,
38 ehdr->e_machine,
39 ehdr->e_version,
40 ehdr->e_entry,
41 ehdr->e_phoff,
42 ehdr->e_shoff,
43 ehdr->e_flags,
44 ehdr
85 Elf32_Ehdr *ehdr = elf32_getehdr (elf); local
[all...]
H A Dupdate4.c40 Elf32_Ehdr *ehdr; local
72 ehdr = elf32_newehdr (elf);
73 if (ehdr == NULL)
83 printf (" %02x", ehdr->e_ident[i]);
88 ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
89 ehdr->e_phoff, ehdr
[all...]
H A Dalldts.c90 Elf32_Ehdr *ehdr = elf32_newehdr (elf); local
91 if (ehdr == NULL)
97 ehdr->e_ident[0] = 42;
98 ehdr->e_ident[5] = 1;
99 ehdr->e_ident[6] = 2;
100 ehdr->e_type = ET_EXEC;
101 ehdr->e_machine = EM_386;
102 ehdr->e_version = 1;
103 ehdr->e_ehsize = 1;
104 ehdr
[all...]
/external/elfutils/libelf/
H A Delf_getident.c57 || (offsetof (struct Elf, state.elf32.ehdr)
58 == offsetof (struct Elf, state.elf64.ehdr))
59 ? elf->state.elf32.ehdr->e_ident
60 : elf->state.elf64.ehdr->e_ident);
H A Dgelf_update_ehdr.c58 Elf32_Ehdr *ehdr = elf->state.elf32.ehdr; local
60 if (ehdr == NULL)
78 memcpy (ehdr->e_ident, src->e_ident, EI_NIDENT);
80 ehdr->name = src->name
97 Elf64_Ehdr *ehdr = elf->state.elf64.ehdr; local
99 if (ehdr == NULL)
106 memcpy (ehdr, src, sizeof (Elf64_Ehdr));
H A Delf_getshdrstrndx.c63 assert (offsetof (struct Elf, state.elf.ehdr)
64 == offsetof (struct Elf, state.elf32.ehdr));
65 assert (sizeof (elf->state.elf.ehdr)
66 == sizeof (elf->state.elf32.ehdr));
67 assert (offsetof (struct Elf, state.elf.ehdr)
68 == offsetof (struct Elf, state.elf64.ehdr));
69 assert (sizeof (elf->state.elf.ehdr)
70 == sizeof (elf->state.elf64.ehdr));
72 if (unlikely (elf->state.elf.ehdr == NULL))
82 ? elf->state.elf32.ehdr
[all...]
H A Dgelf_getehdr.c57 /* The following is an optimization: the ehdr element is at the same
59 if (offsetof (struct Elf, state.elf32.ehdr)
60 != offsetof (struct Elf, state.elf64.ehdr))
63 if (unlikely (elf->state.elf64.ehdr == NULL))
68 Elf32_Ehdr *ehdr = elf->state.elf32.ehdr; local
71 memcpy (dest->e_ident, ehdr->e_ident, EI_NIDENT);
73 dest->name = ehdr->name
91 result = memcpy (dest, elf->state.elf64.ehdr, sizeof (*dest));
H A Delf32_updatenull.c51 ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr,
55 if (memcmp (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG) != 0)
57 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG);
62 update_if_changed (ehdr->e_ident[EI_CLASS], ELFW(ELFCLASS,LIBELFBITS),
66 if (unlikely (ehdr->e_ident[EI_DATA] == ELFDATANONE))
68 ehdr->e_ident[EI_DATA] =
72 else if (unlikely (ehdr->e_ident[EI_DATA] >= ELFDATANUM))
79 && ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
81 && ehdr->e_ident[EI_DATA] != ELFDATA2MSB));
84 update_if_changed (ehdr
[all...]
H A Delf32_newehdr.c70 if (elf->state.ELFW(elf,LIBELFBITS).ehdr == NULL)
73 elf->state.ELFW(elf,LIBELFBITS).ehdr =
77 memset (elf->state.ELFW(elf,LIBELFBITS).ehdr, '\0',
84 result = elf->state.ELFW(elf,LIBELFBITS).ehdr;
H A Delf_newdata.c56 || (offsetof (struct Elf, state.elf32.ehdr)
57 == offsetof (struct Elf, state.elf64.ehdr))
58 ? scn->elf->state.elf32.ehdr == NULL
59 : scn->elf->state.elf64.ehdr == NULL)
/external/valgrind/coregrind/
H A Dlauncher-linux.c203 const Elf32_Ehdr *ehdr = (Elf32_Ehdr *)header; local
207 if (ehdr->e_machine == EM_386 &&
208 (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
209 ehdr->e_ident[EI_OSABI] == ELFOSABI_SOLARIS)) {
214 if (ehdr->e_machine == EM_386 &&
215 (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
216 ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) {
220 if (ehdr->e_machine == EM_ARM &&
221 (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
222 ehdr
247 const Elf64_Ehdr *ehdr = (Elf64_Ehdr *)header; local
[all...]
/external/elfutils/libebl/
H A Debl_check_special_symbol.c38 ebl_check_special_symbol (Ebl *ebl, GElf_Ehdr *ehdr, const GElf_Sym *sym, argument
44 return ebl->check_special_symbol (ebl->elf, ehdr, sym, name, destshdr);
/external/syslinux/gpxe/src/image/
H A Delf.c47 * @v ehdr ELF executable header
51 Elf_Ehdr *ehdr ) {
98 if ( ( e_offset = ( ehdr->e_entry - dest ) ) < phdr->p_filesz ) {
99 image->priv.phys = ehdr->e_entry;
102 } else if ( ( e_offset = ( ehdr->e_entry - phdr->p_vaddr ) )
108 ( ( unsigned long ) ehdr->e_entry ) );
122 Elf_Ehdr ehdr; local
132 copy_from_user ( &ehdr, image->data, 0, sizeof ( ehdr ) );
133 if ( memcmp ( &ehdr
[all...]
/external/tcpdump/
H A Dprint-ipfc.c84 struct ether_header ehdr; local
94 extract_ipfc_addrs(ipfcp, (char *)ESRC(&ehdr), (char *)EDST(&ehdr));
97 ipfc_hdr_print(ndo, ipfcp, length, ESRC(&ehdr), EDST(&ehdr));
105 if (llc_print(ndo, p, length, caplen, ESRC(&ehdr), EDST(&ehdr),
113 ESRC(&ehdr), EDST(&ehdr));
/external/elfutils/libdwfl/
H A Delf-from-memory.c107 } ehdr; local
117 .d_buf = &ehdr,
118 .d_size = sizeof ehdr,
137 phoff = ehdr.e32.e_phoff;
138 phnum = ehdr.e32.e_phnum;
139 phentsize = ehdr.e32.e_phentsize;
142 shdrs_end = ehdr.e32.e_shoff + ehdr.e32.e_shnum * ehdr.e32.e_shentsize;
149 phoff = ehdr
[all...]
/external/libunwind/src/ia64/
H A DGfind_unwind_table.c39 Elf64_Ehdr *ehdr = edi->ei.image; local
64 soff = ehdr->e_shoff;
65 str_soff = soff + (ehdr->e_shstrndx * ehdr->e_shentsize);
67 if (soff + ehdr->e_shnum * ehdr->e_shentsize > edi->ei.size)
70 soff + ehdr->e_shnum * ehdr->e_shentsize,
78 for (i = 0; i < ehdr->e_shnum; ++i)
86 shdr = (Elf64_Shdr *) (((char *) shdr) + ehdr
100 Elf64_Ehdr *ehdr; local
[all...]
/external/vixl/examples/aarch32/
H A Ddisasm-a32.cc99 explicit SectionLocator(const Elf32_Ehdr* ehdr) { argument
101 reinterpret_cast<const char*>(ehdr) + ehdr->e_shoff);
104 reinterpret_cast<const char*>(ehdr) + shdr_[ehdr->e_shstrndx].sh_offset;
105 nsections_ = ehdr->e_shnum;
122 void LocateSymbols(const Elf32_Ehdr* ehdr, argument
128 reinterpret_cast<const char*>(ehdr) + ehdr->e_shoff);
131 reinterpret_cast<const char*>(ehdr)
169 StaticSymbolVisitor(const Elf32_Ehdr* ehdr, SymbolTable* symbols) argument
239 const Elf32_Ehdr* ehdr = reinterpret_cast<const Elf32_Ehdr*>(base_addr); local
[all...]
/external/elfutils/backends/
H A Dppc64_resolve_sym.c49 GElf_Ehdr ehdr_mem, *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem); local
50 if (ehdr != NULL)
58 ehdr->e_ident[EI_DATA]) != NULL)
/external/libunwind/src/
H A Delfxx.c113 static bool elf_w (section_table_offset) (struct elf_image* ei, Elf_W(Ehdr)* ehdr, Elf_W(Off)* offset) { argument
114 GET_EHDR_FIELD(ei, ehdr, e_shoff, true);
115 GET_EHDR_FIELD(ei, ehdr, e_shentsize, true);
116 GET_EHDR_FIELD(ei, ehdr, e_shnum, true);
119 if (ehdr->e_shoff + ehdr->e_shnum * ehdr->e_shentsize > size) {
121 (unsigned long) (ehdr->e_shoff + ehdr->e_shnum * ehdr
130 string_table_offset( struct elf_image* ei, int section, Elf_W(Ehdr)* ehdr, Elf_W(Off)* offset) argument
158 lookup_symbol_memory( unw_addr_space_t as, unw_word_t ip, struct elf_image* ei, Elf_W(Addr) load_offset, char* buf, size_t buf_len, unw_word_t* offp, Elf_W(Ehdr)* ehdr) argument
249 get_load_offset_memory( struct elf_image* ei, unsigned long segbase, unsigned long mapoff, Elf_W(Ehdr)* ehdr, Elf_W(Addr)* load_offset) argument
421 lookup_symbol( unw_addr_space_t as, unw_word_t ip, struct elf_image *ei, Elf_W(Addr) load_offset, char *buf, size_t buf_len, unw_word_t* offp, Elf_W(Ehdr)* ehdr) argument
442 get_load_offset( struct elf_image* ei, unsigned long segbase, unsigned long mapoff, Elf_W(Ehdr)* ehdr, Elf_W(Addr)* load_offset) argument
[all...]
/external/syslinux/gpxe/src/arch/i386/image/
H A Delfboot.c75 Elf32_Ehdr ehdr; local
88 copy_from_user ( &ehdr, image->data, 0, sizeof ( ehdr ) );
89 if ( memcmp ( ehdr.e_ident, e_ident, sizeof ( e_ident ) ) != 0 ) {
/external/elfutils/libasm/
H A Dasm_begin.c72 GElf_Ehdr *ehdr; local
92 ehdr = gelf_getehdr (result->out.elf, &ehdr_mem);
94 assert (ehdr != NULL);
97 ehdr->e_type = ET_REL;
99 ehdr->e_version = EV_CURRENT;
102 ehdr->e_machine = ebl_get_elfmachine (ebl);
103 ehdr->e_ident[EI_CLASS] = class;
104 ehdr->e_ident[EI_DATA] = ebl_get_elfdata (ebl);
106 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG);
109 (void) gelf_update_ehdr (result->out.elf, ehdr);
[all...]

Completed in 397 milliseconds

12345