/external/elfutils/tests/ |
D | update1.c | 38 Elf32_Ehdr *ehdr; in main() local 58 ehdr = elf32_newehdr (elf); in main() 59 if (ehdr == NULL) in main() 69 printf (" %02x", ehdr->e_ident[i]); in main() 74 ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry, in main() 75 ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize, in main() 76 ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize, in main() 77 ehdr->e_shnum, ehdr->e_shstrndx); in main() 80 ehdr->e_ident[0] = 42; in main() 81 ehdr->e_ident[4] = 1; in main() [all …]
|
D | update2.c | 38 Elf32_Ehdr *ehdr; in main() local 59 ehdr = elf32_newehdr (elf); in main() 60 if (ehdr == NULL) in main() 70 printf (" %02x", ehdr->e_ident[i]); in main() 75 ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry, in main() 76 ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize, in main() 77 ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize, in main() 78 ehdr->e_shnum, ehdr->e_shstrndx); in main() 81 ehdr->e_ident[0] = 42; in main() 82 ehdr->e_ident[4] = 1; in main() [all …]
|
D | update3.c | 40 Elf32_Ehdr *ehdr; in main() local 68 ehdr = elf32_newehdr (elf); in main() 69 if (ehdr == NULL) in main() 79 printf (" %02x", ehdr->e_ident[i]); in main() 84 ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry, in main() 85 ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize, in main() 86 ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize, in main() 87 ehdr->e_shnum, ehdr->e_shstrndx); in main() 90 ehdr->e_ident[0] = 42; in main() 91 ehdr->e_ident[4] = 1; in main() [all …]
|
D | elfshphehdr.c | 68 GElf_Ehdr ehdr; in test() local 69 check_elf ("gelf_getehdr", gelf_getehdr (elf, &ehdr) != NULL); in test() 70 check ("e_shnum == 0", ehdr.e_shnum == 0); in test() 71 check ("e_phnum == 0", ehdr.e_phnum == 0); in test() 72 check ("e_shoff == 0", ehdr.e_shoff == 0); in test() 73 check ("e_phoff == 0", ehdr.e_phoff == 0); in test() 84 ehdr.e_ident[EI_DATA] = ELFDATANONE; /* Ask for native encoding. */ in test() 85 ehdr.e_type = ET_EXEC; in test() 86 ehdr.e_machine = EM_386; in test() 87 ehdr.e_version = EV_NONE; /* Ask for current version. */ in test() [all …]
|
D | update4.c | 40 Elf32_Ehdr *ehdr; in main() local 72 ehdr = elf32_newehdr (elf); in main() 73 if (ehdr == NULL) in main() 83 printf (" %02x", ehdr->e_ident[i]); in main() 88 ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry, in main() 89 ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize, in main() 90 ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize, in main() 91 ehdr->e_shnum, ehdr->e_shstrndx); in main() 94 ehdr->e_ident[0] = 42; in main() 95 ehdr->e_ident[4] = 1; in main() [all …]
|
D | newfile.c | 26 print_ehdr (Elf32_Ehdr *ehdr) in print_ehdr() argument 31 printf (" %02x", ehdr->e_ident[n]); in print_ehdr() 37 ehdr->e_type, in print_ehdr() 38 ehdr->e_machine, in print_ehdr() 39 ehdr->e_version, in print_ehdr() 40 ehdr->e_entry, in print_ehdr() 41 ehdr->e_phoff, in print_ehdr() 42 ehdr->e_shoff, in print_ehdr() 43 ehdr->e_flags, in print_ehdr() 44 ehdr->e_ehsize, in print_ehdr() [all …]
|
D | alldts.c | 90 Elf32_Ehdr *ehdr = elf32_newehdr (elf); in main() local 91 if (ehdr == NULL) in main() 97 ehdr->e_ident[0] = 42; in main() 98 ehdr->e_ident[5] = 1; in main() 99 ehdr->e_ident[6] = 2; in main() 100 ehdr->e_type = ET_EXEC; in main() 101 ehdr->e_machine = EM_386; in main() 102 ehdr->e_version = 1; in main() 103 ehdr->e_ehsize = 1; in main() 104 ehdr->e_shnum = 3; in main() [all …]
|
D | saridx.c | 194 GElf_Ehdr ehdr; in main() local 197 if (gelf_getehdr (subelf, &ehdr) == NULL) in main() 202 ehdr.e_ident[EI_CLASS] == ELFCLASS32 in main() 205 ehdr.e_ident[EI_DATA] == ELFDATA2LSB in main() 208 ehdr.e_type == ET_REL in main() 210 : (ehdr.e_type == ET_EXEC in main() 212 : (ehdr.e_type == ET_DYN in main() 216 (ehdr.e_machine >= (sizeof (machines) in main() 218 || machines[ehdr.e_machine] == NULL) in main() 220 : machines[ehdr.e_machine]); in main()
|
D | dwflsyms.c | 90 GElf_Ehdr ehdr; in elf_section_name() local 94 gelf_getehdr (elf, &ehdr); in elf_section_name() 95 return elf_strptr (elf, ehdr.e_shstrndx, shdr.sh_name); in elf_section_name() 139 GElf_Ehdr ehdr; in list_syms() local 140 gelf_getehdr (elf, &ehdr); in list_syms() 146 || ehdr.e_type == ET_REL); in list_syms() 167 || ehdr.e_type == ET_REL); in list_syms() 186 if (value != isym.st_value + bias && ehdr.e_type != ET_REL) in list_syms() 194 gelf_getehdr (melf, &ehdr); in list_syms() 195 const char *sname = elf_strptr (melf, ehdr.e_shstrndx, in list_syms()
|
/external/valgrind/coregrind/ |
D | launcher-linux.c | 203 const Elf32_Ehdr *ehdr = (Elf32_Ehdr *)header; in select_platform() local 207 if (ehdr->e_machine == EM_386 && in select_platform() 208 (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV || in select_platform() 209 ehdr->e_ident[EI_OSABI] == ELFOSABI_SOLARIS)) { in select_platform() 214 if (ehdr->e_machine == EM_386 && in select_platform() 215 (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV || in select_platform() 216 ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) { in select_platform() 220 if (ehdr->e_machine == EM_ARM && in select_platform() 221 (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV || in select_platform() 222 ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) { in select_platform() [all …]
|
/external/libunwind/src/ |
D | elfxx.c | 113 static bool elf_w (section_table_offset) (struct elf_image* ei, Elf_W(Ehdr)* ehdr, Elf_W(Off)* offs… in elf_w() 114 GET_EHDR_FIELD(ei, ehdr, e_shoff, true); in elf_w() 115 GET_EHDR_FIELD(ei, ehdr, e_shentsize, true); in elf_w() 116 GET_EHDR_FIELD(ei, ehdr, e_shnum, true); in elf_w() 119 if (ehdr->e_shoff + ehdr->e_shnum * ehdr->e_shentsize > size) { in elf_w() 121 (unsigned long) (ehdr->e_shoff + ehdr->e_shnum * ehdr->e_shentsize), in elf_w() 126 *offset = ehdr->e_shoff; in elf_w() 131 struct elf_image* ei, int section, Elf_W(Ehdr)* ehdr, Elf_W(Off)* offset) { in elf_w() 132 GET_EHDR_FIELD(ei, ehdr, e_shoff, true); in elf_w() 133 GET_EHDR_FIELD(ei, ehdr, e_shentsize, true); in elf_w() [all …]
|
/external/elfutils/libdwfl/ |
D | elf-from-memory.c | 107 } ehdr; in elf_from_remote_memory() local 117 .d_buf = &ehdr, in elf_from_remote_memory() 118 .d_size = sizeof ehdr, in elf_from_remote_memory() 137 phoff = ehdr.e32.e_phoff; in elf_from_remote_memory() 138 phnum = ehdr.e32.e_phnum; in elf_from_remote_memory() 139 phentsize = ehdr.e32.e_phentsize; in elf_from_remote_memory() 142 shdrs_end = ehdr.e32.e_shoff + ehdr.e32.e_shnum * ehdr.e32.e_shentsize; in elf_from_remote_memory() 149 phoff = ehdr.e64.e_phoff; in elf_from_remote_memory() 150 phnum = ehdr.e64.e_phnum; in elf_from_remote_memory() 151 phentsize = ehdr.e64.e_phentsize; in elf_from_remote_memory() [all …]
|
/external/elfutils/libelf/ |
D | elf32_updatenull.c | 51 ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr, in ELFW() 55 if (memcmp (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG) != 0) in ELFW() 57 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG); in ELFW() 62 update_if_changed (ehdr->e_ident[EI_CLASS], ELFW(ELFCLASS,LIBELFBITS), in ELFW() 66 if (unlikely (ehdr->e_ident[EI_DATA] == ELFDATANONE)) in ELFW() 68 ehdr->e_ident[EI_DATA] = in ELFW() 72 else if (unlikely (ehdr->e_ident[EI_DATA] >= ELFDATANUM)) in ELFW() 79 && ehdr->e_ident[EI_DATA] != ELFDATA2LSB) in ELFW() 81 && ehdr->e_ident[EI_DATA] != ELFDATA2MSB)); in ELFW() 84 update_if_changed (ehdr->e_ident[EI_VERSION], EV_CURRENT, in ELFW() [all …]
|
D | elf_getshdrstrndx.c | 63 assert (offsetof (struct Elf, state.elf.ehdr) in elf_getshdrstrndx() 64 == offsetof (struct Elf, state.elf32.ehdr)); in elf_getshdrstrndx() 65 assert (sizeof (elf->state.elf.ehdr) in elf_getshdrstrndx() 66 == sizeof (elf->state.elf32.ehdr)); in elf_getshdrstrndx() 67 assert (offsetof (struct Elf, state.elf.ehdr) in elf_getshdrstrndx() 68 == offsetof (struct Elf, state.elf64.ehdr)); in elf_getshdrstrndx() 69 assert (sizeof (elf->state.elf.ehdr) in elf_getshdrstrndx() 70 == sizeof (elf->state.elf64.ehdr)); in elf_getshdrstrndx() 72 if (unlikely (elf->state.elf.ehdr == NULL)) in elf_getshdrstrndx() 82 ? elf->state.elf32.ehdr->e_shstrndx in elf_getshdrstrndx() [all …]
|
D | gelf_update_ehdr.c | 58 Elf32_Ehdr *ehdr = elf->state.elf32.ehdr; in gelf_update_ehdr() local 60 if (ehdr == NULL) in gelf_update_ehdr() 78 memcpy (ehdr->e_ident, src->e_ident, EI_NIDENT); in gelf_update_ehdr() 80 ehdr->name = src->name in gelf_update_ehdr() 97 Elf64_Ehdr *ehdr = elf->state.elf64.ehdr; in gelf_update_ehdr() local 99 if (ehdr == NULL) in gelf_update_ehdr() 106 memcpy (ehdr, src, sizeof (Elf64_Ehdr)); in gelf_update_ehdr()
|
D | gelf_getehdr.c | 59 if (offsetof (struct Elf, state.elf32.ehdr) in __gelf_getehdr_rdlock() 60 != offsetof (struct Elf, state.elf64.ehdr)) in __gelf_getehdr_rdlock() 63 if (unlikely (elf->state.elf64.ehdr == NULL)) in __gelf_getehdr_rdlock() 68 Elf32_Ehdr *ehdr = elf->state.elf32.ehdr; in __gelf_getehdr_rdlock() local 71 memcpy (dest->e_ident, ehdr->e_ident, EI_NIDENT); in __gelf_getehdr_rdlock() 73 dest->name = ehdr->name in __gelf_getehdr_rdlock() 91 result = memcpy (dest, elf->state.elf64.ehdr, sizeof (*dest)); in __gelf_getehdr_rdlock()
|
D | elf_begin.c | 84 } ehdr; in get_shnum() local 98 ehdr.p = e_ident; in get_shnum() 104 ehdr.p = &ehdr_mem; in get_shnum() 143 result = ehdr.e32->e_shnum; in get_shnum() 145 if (unlikely (result == 0) && ehdr.e32->e_shoff != 0) in get_shnum() 147 if (unlikely (ehdr.e32->e_shoff >= maxsize) in get_shnum() 148 || unlikely (maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr))) in get_shnum() 154 || (((size_t) ((char *) map_address + ehdr.e32->e_shoff)) in get_shnum() 157 result = ((Elf32_Shdr *) ((char *) map_address + ehdr.e32->e_shoff in get_shnum() 167 + ehdr.e32->e_shoff in get_shnum() [all …]
|
/external/libunwind/src/ia64/ |
D | Gfind_unwind_table.c | 39 Elf64_Ehdr *ehdr = edi->ei.image; in find_gp() local 64 soff = ehdr->e_shoff; in find_gp() 65 str_soff = soff + (ehdr->e_shstrndx * ehdr->e_shentsize); in find_gp() 67 if (soff + ehdr->e_shnum * ehdr->e_shentsize > edi->ei.size) in find_gp() 70 soff + ehdr->e_shnum * ehdr->e_shentsize, in find_gp() 78 for (i = 0; i < ehdr->e_shnum; ++i) in find_gp() 86 shdr = (Elf64_Shdr *) (((char *) shdr) + ehdr->e_shentsize); in find_gp() 100 Elf64_Ehdr *ehdr; in ia64_find_unwind_table() local 106 ehdr = edi->ei.image; in ia64_find_unwind_table() 107 phdr = (Elf64_Phdr *) ((char *) edi->ei.image + ehdr->e_phoff); in ia64_find_unwind_table() [all …]
|
/external/tcpdump/ |
D | print-token.c | 153 struct ether_header ehdr; in token_print() local 167 extract_token_addrs(trp, (char*)ESRC(&ehdr), (char*)EDST(&ehdr)); in token_print() 172 *ESRC(&ehdr) &= 0x7f; in token_print() 175 token_hdr_print(ndo, trp, length, ESRC(&ehdr), EDST(&ehdr)); in token_print() 203 token_hdr_print(ndo, trp, length, ESRC(&ehdr), EDST(&ehdr)); in token_print() 214 if (llc_print(ndo, p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in token_print() 220 ESRC(&ehdr), EDST(&ehdr)); in token_print() 233 ESRC(&ehdr), EDST(&ehdr)); in token_print()
|
D | print-ipfc.c | 84 struct ether_header ehdr; in ipfc_print() local 94 extract_ipfc_addrs(ipfcp, (char *)ESRC(&ehdr), (char *)EDST(&ehdr)); in ipfc_print() 97 ipfc_hdr_print(ndo, ipfcp, length, ESRC(&ehdr), EDST(&ehdr)); in ipfc_print() 105 if (llc_print(ndo, p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in ipfc_print() 113 ESRC(&ehdr), EDST(&ehdr)); in ipfc_print()
|
D | print-fddi.c | 285 struct ether_header ehdr; in fddi_print() local 296 extract_fddi_addrs(fddip, (char *)ESRC(&ehdr), (char *)EDST(&ehdr)); in fddi_print() 299 fddi_hdr_print(ndo, fddip, length, ESRC(&ehdr), EDST(&ehdr)); in fddi_print() 309 if (llc_print(ndo, p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in fddi_print() 317 ESRC(&ehdr), EDST(&ehdr)); in fddi_print() 330 fddi_hdr_print(ndo, fddip, length + FDDI_HDRLEN, ESRC(&ehdr), in fddi_print() 331 EDST(&ehdr)); in fddi_print()
|
/external/elfutils/libasm/ |
D | asm_begin.c | 72 GElf_Ehdr *ehdr; in prepare_binary_output() local 92 ehdr = gelf_getehdr (result->out.elf, &ehdr_mem); in prepare_binary_output() 94 assert (ehdr != NULL); in prepare_binary_output() 97 ehdr->e_type = ET_REL; in prepare_binary_output() 99 ehdr->e_version = EV_CURRENT; in prepare_binary_output() 102 ehdr->e_machine = ebl_get_elfmachine (ebl); in prepare_binary_output() 103 ehdr->e_ident[EI_CLASS] = class; in prepare_binary_output() 104 ehdr->e_ident[EI_DATA] = ebl_get_elfdata (ebl); in prepare_binary_output() 106 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG); in prepare_binary_output() 109 (void) gelf_update_ehdr (result->out.elf, ehdr); in prepare_binary_output()
|
/external/elfutils/libdw/ |
D | dwarf_getcfi_elf.c | 74 const GElf_Ehdr *ehdr, GElf_Addr *eh_frame_vaddr, in parse_eh_frame_hdr() argument 96 .e_ident = ehdr->e_ident, in parse_eh_frame_hdr() 126 getcfi_gnu_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, const GElf_Phdr *phdr) in getcfi_gnu_eh_frame() argument 143 phdr->p_vaddr, ehdr, in getcfi_gnu_eh_frame() 150 vsize = encoded_value_size (data, ehdr->e_ident, search_table_encoding, in getcfi_gnu_eh_frame() 194 getcfi_phdr (Elf *elf, const GElf_Ehdr *ehdr) in getcfi_phdr() argument 207 return getcfi_gnu_eh_frame (elf, ehdr, phdr); in getcfi_phdr() 215 getcfi_scn_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, in getcfi_scn_eh_frame() argument 239 hdr_vaddr, ehdr, &eh_frame_vaddr, in getcfi_scn_eh_frame() 246 vsize = encoded_value_size (hdr_data, ehdr->e_ident, in getcfi_scn_eh_frame() [all …]
|
D | dwarf_begin_elf.c | 68 check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp) in check_section() argument 98 const char *scnname = elf_strptr (result->elf, ehdr->e_shstrndx, in check_section() 217 global_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr) in global_read() argument 222 result = check_section (result, ehdr, scn, false); in global_read() 229 scngrp_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr, Elf_Scn *scngrp) in scngrp_read() argument 278 result = check_section (result, ehdr, scn, true); in scngrp_read() 290 GElf_Ehdr *ehdr; in dwarf_begin_elf() local 295 ehdr = gelf_getehdr (elf, &ehdr_mem); in dwarf_begin_elf() 296 if (ehdr == NULL) in dwarf_begin_elf() 322 if ((BYTE_ORDER == LITTLE_ENDIAN && ehdr->e_ident[EI_DATA] == ELFDATA2MSB) in dwarf_begin_elf() [all …]
|
/external/elfutils/src/ |
D | elflint.c | 96 static void check_note_section (Ebl *ebl, GElf_Ehdr *ehdr, 354 check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size) in check_elf_header() argument 360 if (ehdr->e_ident[EI_MAG0] != ELFMAG0) in check_elf_header() 362 if (ehdr->e_ident[EI_MAG1] != ELFMAG1) in check_elf_header() 364 if (ehdr->e_ident[EI_MAG2] != ELFMAG2) in check_elf_header() 366 if (ehdr->e_ident[EI_MAG3] != ELFMAG3) in check_elf_header() 369 if (ehdr->e_ident[EI_CLASS] != ELFCLASS32 in check_elf_header() 370 && ehdr->e_ident[EI_CLASS] != ELFCLASS64) in check_elf_header() 372 EI_CLASS, ehdr->e_ident[EI_CLASS]); in check_elf_header() 374 if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB in check_elf_header() [all …]
|