/external/elfutils/tests/ |
D | update1.c | 33 Elf32_Ehdr *ehdr; in main() local 53 ehdr = elf32_newehdr (elf); in main() 54 if (ehdr == NULL) in main() 64 printf (" %02x", ehdr->e_ident[i]); in main() 69 ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry, in main() 70 ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize, in main() 71 ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize, in main() 72 ehdr->e_shnum, ehdr->e_shstrndx); in main() 75 ehdr->e_ident[0] = 42; in main() 76 ehdr->e_ident[4] = 1; in main() [all …]
|
D | update2.c | 33 Elf32_Ehdr *ehdr; in main() local 54 ehdr = elf32_newehdr (elf); in main() 55 if (ehdr == NULL) in main() 65 printf (" %02x", ehdr->e_ident[i]); in main() 70 ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry, in main() 71 ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize, in main() 72 ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize, in main() 73 ehdr->e_shnum, ehdr->e_shstrndx); in main() 76 ehdr->e_ident[0] = 42; in main() 77 ehdr->e_ident[4] = 1; in main() [all …]
|
D | update3.c | 35 Elf32_Ehdr *ehdr; in main() local 63 ehdr = elf32_newehdr (elf); in main() 64 if (ehdr == NULL) in main() 74 printf (" %02x", ehdr->e_ident[i]); in main() 79 ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry, in main() 80 ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize, in main() 81 ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize, in main() 82 ehdr->e_shnum, ehdr->e_shstrndx); in main() 85 ehdr->e_ident[0] = 42; in main() 86 ehdr->e_ident[4] = 1; in main() [all …]
|
D | update4.c | 36 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 | newfile.c | 22 print_ehdr (Elf32_Ehdr *ehdr) in print_ehdr() argument 27 printf (" %02x", ehdr->e_ident[n]); in print_ehdr() 33 ehdr->e_type, in print_ehdr() 34 ehdr->e_machine, in print_ehdr() 35 ehdr->e_version, in print_ehdr() 36 ehdr->e_entry, in print_ehdr() 37 ehdr->e_phoff, in print_ehdr() 38 ehdr->e_shoff, in print_ehdr() 39 ehdr->e_flags, in print_ehdr() 40 ehdr->e_ehsize, in print_ehdr() [all …]
|
D | saridx.c | 190 GElf_Ehdr ehdr; in main() local 193 if (gelf_getehdr (subelf, &ehdr) == NULL) in main() 198 ehdr.e_ident[EI_CLASS] == ELFCLASS32 in main() 201 ehdr.e_ident[EI_DATA] == ELFDATA2LSB in main() 204 ehdr.e_type == ET_REL in main() 206 : (ehdr.e_type == ET_EXEC in main() 208 : (ehdr.e_type == ET_DYN in main() 212 (ehdr.e_machine >= (sizeof (machines) in main() 214 || machines[ehdr.e_machine] == NULL) in main() 216 : machines[ehdr.e_machine]); in main()
|
D | ecp.c | 50 GElf_Ehdr *ehdr; in main() local 51 gelf_update_ehdr (outelf, (ehdr = gelf_getehdr (inelf, &ehdr_mem))); in main() 53 if (ehdr->e_phnum > 0) in main() 57 if (gelf_newphdr (outelf, ehdr->e_phnum) == 0) in main() 61 for (cnt = 0; cnt < ehdr->e_phnum; ++cnt) in main()
|
/external/elfutils/src/ |
D | elflint.c | 320 section_name (Ebl *ebl, GElf_Ehdr *ehdr, int idx) in section_name() argument 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 …]
|
D | readelf.c | 158 static void print_ehdr (Ebl *ebl, GElf_Ehdr *ehdr); 159 static void print_shdr (Ebl *ebl, GElf_Ehdr *ehdr); 160 static void print_phdr (Ebl *ebl, GElf_Ehdr *ehdr); 161 static void print_scngrp (Ebl *ebl, GElf_Ehdr *ehdr); 162 static void print_dynamic (Ebl *ebl, GElf_Ehdr *ehdr); 163 static void print_relocs (Ebl *ebl, GElf_Ehdr *ehdr); 164 static void handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, 166 static void handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, 168 static void print_symtab (Ebl *ebl, GElf_Ehdr *ehdr, int type); 169 static void handle_symtab (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, [all …]
|
/external/qemu/ |
D | elf_ops.h | 1 static void glue(bswap_ehdr, SZ)(struct elfhdr *ehdr) in glue() 3 bswap16s(&ehdr->e_type); /* Object file type */ in glue() 4 bswap16s(&ehdr->e_machine); /* Architecture */ in glue() 5 bswap32s(&ehdr->e_version); /* Object file version */ in glue() 6 bswapSZs(&ehdr->e_entry); /* Entry point virtual address */ in glue() 7 bswapSZs(&ehdr->e_phoff); /* Program header table file offset */ in glue() 8 bswapSZs(&ehdr->e_shoff); /* Section header table file offset */ in glue() 9 bswap32s(&ehdr->e_flags); /* Processor-specific flags */ in glue() 10 bswap16s(&ehdr->e_ehsize); /* ELF header size in bytes */ in glue() 11 bswap16s(&ehdr->e_phentsize); /* Program header table entry size */ in glue() [all …]
|
/external/elfutils/libelf/ |
D | elf32_updatenull.c | 39 ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr, in ELFW() 43 if (memcmp (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG) != 0) in ELFW() 45 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG); in ELFW() 50 update_if_changed (ehdr->e_ident[EI_CLASS], ELFW(ELFCLASS,LIBELFBITS), in ELFW() 54 if (unlikely (ehdr->e_ident[EI_DATA] == ELFDATANONE)) in ELFW() 56 ehdr->e_ident[EI_DATA] = in ELFW() 60 else if (unlikely (ehdr->e_ident[EI_DATA] >= ELFDATANUM)) in ELFW() 67 && ehdr->e_ident[EI_DATA] != ELFDATA2LSB) in ELFW() 69 && ehdr->e_ident[EI_DATA] != ELFDATA2MSB)); in ELFW() 72 update_if_changed (ehdr->e_ident[EI_VERSION], EV_CURRENT, in ELFW() [all …]
|
D | elf_getshstrndx.c | 51 assert (offsetof (struct Elf, state.elf.ehdr) 52 == offsetof (struct Elf, state.elf32.ehdr)); 53 assert (sizeof (elf->state.elf.ehdr) 54 == sizeof (elf->state.elf32.ehdr)); 55 assert (offsetof (struct Elf, state.elf.ehdr) 56 == offsetof (struct Elf, state.elf64.ehdr)); 57 assert (sizeof (elf->state.elf.ehdr) 58 == sizeof (elf->state.elf64.ehdr)); 60 if (unlikely (elf->state.elf.ehdr == NULL)) 70 ? elf->state.elf32.ehdr->e_shstrndx [all …]
|
D | elf32_updatefile.c | 86 ElfW2(LIBELFBITS,Ehdr) *ehdr; in __elfw2() 91 ehdr = elf->state.ELFW(elf,LIBELFBITS).ehdr; in __elfw2() 112 (*fctp) ((char *) elf->map_address + elf->start_offset, ehdr, in __elfw2() 116 memcpy (elf->map_address + elf->start_offset, ehdr, in __elfw2() 134 if (ehdr->e_phoff > ehdr->e_ehsize) in __elfw2() 135 memset (elf->map_address + elf->start_offset + ehdr->e_ehsize, in __elfw2() 136 __libelf_fill_byte, ehdr->e_phoff - ehdr->e_ehsize); in __elfw2() 149 (*fctp) (elf->map_address + elf->start_offset + ehdr->e_phoff, in __elfw2() 151 sizeof (ElfW2(LIBELFBITS,Phdr)) * ehdr->e_phnum, 1); in __elfw2() 154 memcpy (elf->map_address + elf->start_offset + ehdr->e_phoff, in __elfw2() [all …]
|
D | gelf_update_ehdr.c | 46 Elf32_Ehdr *ehdr = elf->state.elf32.ehdr; in gelf_update_ehdr() local 48 if (ehdr == NULL) in gelf_update_ehdr() 66 memcpy (ehdr->e_ident, src->e_ident, EI_NIDENT); in gelf_update_ehdr() 68 ehdr->name = src->name in gelf_update_ehdr() 85 Elf64_Ehdr *ehdr = elf->state.elf64.ehdr; in gelf_update_ehdr() local 87 if (ehdr == NULL) in gelf_update_ehdr() 94 memcpy (ehdr, src, sizeof (Elf64_Ehdr)); in gelf_update_ehdr()
|
D | gelf_getehdr.c | 48 Elf32_Ehdr *ehdr = elf->state.elf32.ehdr; local 51 if (ehdr == NULL) 56 memcpy (dest->e_ident, ehdr->e_ident, EI_NIDENT); 58 dest->name = ehdr->name 79 if (elf->state.elf64.ehdr == NULL) 82 result = memcpy (dest, elf->state.elf64.ehdr, sizeof (*dest));
|
D | elf_begin.c | 71 } ehdr; in get_shnum() local 80 ehdr.p = (char *) map_address + offset; in get_shnum() 86 ehdr.p = alloca (len); in get_shnum() 88 if ((size_t) pread (fildes, ehdr.p, len, offset) != len) in get_shnum() 96 CONVERT (ehdr.e32->e_shnum); in get_shnum() 97 CONVERT (ehdr.e32->e_shoff); in get_shnum() 101 CONVERT (ehdr.e64->e_shnum); in get_shnum() 102 CONVERT (ehdr.e64->e_shoff); in get_shnum() 110 result = ehdr.e32->e_shnum; in get_shnum() 112 if (unlikely (result == 0) && ehdr.e32->e_shoff != 0) in get_shnum() [all …]
|
D | elf32_getphdr.c | 69 ElfW2(LIBELFBITS,Ehdr) *ehdr = elf->state.ELFW(elf,LIBELFBITS).ehdr; 74 phnum = ehdr->e_phnum; 86 if (ehdr->e_ident[EI_DATA] == MY_ELFDATA 88 || (ehdr->e_phoff 92 ((char *) elf->map_address + elf->start_offset + ehdr->e_phoff); 114 || (ehdr->e_phoff 118 + elf->start_offset + ehdr->e_phoff); 123 elf->start_offset + ehdr->e_phoff), 156 (elf->start_offset + ehdr->e_phoff)) != size) 167 if (ehdr->e_ident[EI_DATA] != MY_ELFDATA)
|
D | elf32_getshdr.c | 42 if (unlikely (scn->elf->state.elf.ehdr == NULL)) 59 ElfW2(LIBELFBITS,Ehdr) *ehdr = elf->state.ELFW(elf,LIBELFBITS).ehdr; 93 assert (ehdr->e_ident[EI_DATA] != MY_ELFDATA 95 && (ehdr->e_shoff 101 || (ehdr->e_shoff 105 + elf->start_offset + ehdr->e_shoff); 110 + elf->start_offset + ehdr->e_shoff), 133 elf->start_offset + ehdr->e_shoff) != size) 142 if (ehdr->e_ident[EI_DATA] != MY_ELFDATA)
|
D | elf32_newphdr.c | 60 if (unlikely (elf->state.ELFW(elf,LIBELFBITS).ehdr == NULL)) 79 elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phnum = 0; 81 elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phentsize = 91 else if (elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phnum != count 108 elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phnum = count; 110 elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phentsize = 124 assert (elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phentsize
|
D | elf_getident.c | 47 || (offsetof (struct Elf, state.elf32.ehdr) 48 == offsetof (struct Elf, state.elf64.ehdr)) 49 ? elf->state.elf32.ehdr->e_ident 50 : elf->state.elf64.ehdr->e_ident);
|
/external/tcpdump/ |
D | print-token.c | 105 struct ether_header ehdr; in token_print() local 119 extract_token_addrs(trp, (char*)ESRC(&ehdr), (char*)EDST(&ehdr)); in token_print() 124 *ESRC(&ehdr) &= 0x7f; in token_print() 127 token_hdr_print(trp, length, ESRC(&ehdr), EDST(&ehdr)); in token_print() 146 token_hdr_print(trp, length, ESRC(&ehdr), EDST(&ehdr)); in token_print() 158 if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in token_print() 164 ESRC(&ehdr), EDST(&ehdr)); in token_print() 177 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(ipfcp, length, ESRC(&ehdr), EDST(&ehdr)); in ipfc_print() 105 if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in ipfc_print() 113 ESRC(&ehdr), EDST(&ehdr)); in ipfc_print()
|
D | print-fddi.c | 245 struct ether_header ehdr; in fddi_print() local 256 extract_fddi_addrs(fddip, (char *)ESRC(&ehdr), (char *)EDST(&ehdr)); in fddi_print() 259 fddi_hdr_print(fddip, length, ESRC(&ehdr), EDST(&ehdr)); in fddi_print() 269 if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in fddi_print() 277 ESRC(&ehdr), EDST(&ehdr)); in fddi_print() 290 fddi_hdr_print(fddip, length + FDDI_HDRLEN, ESRC(&ehdr), in fddi_print() 291 EDST(&ehdr)); in fddi_print()
|
/external/elfutils/libdw/ |
D | dwarf_begin_elf.c | 51 check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp) in check_section() argument 76 const char *scnname = elf_strptr (result->elf, ehdr->e_shstrndx, in check_section() 130 global_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr, Dwarf_Cmd cmd) in global_read() argument 135 check_section (result, ehdr, scn, false); in global_read() 142 scngrp_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr, Dwarf_Cmd cmd, in scngrp_read() argument 171 check_section (result, ehdr, scn, true); in scngrp_read() 184 GElf_Ehdr *ehdr; local 189 ehdr = gelf_getehdr (elf, &ehdr_mem); 190 if (ehdr == NULL) 213 if ((BYTE_ORDER == LITTLE_ENDIAN && ehdr->e_ident[EI_DATA] == ELFDATA2MSB) [all …]
|
/external/elfutils/libasm/ |
D | asm_begin.c | 40 GElf_Ehdr *ehdr; in prepare_binary_output() local 59 ehdr = gelf_getehdr (result->out.elf, &ehdr_mem); in prepare_binary_output() 61 assert (ehdr != NULL); in prepare_binary_output() 64 ehdr->e_type = ET_REL; in prepare_binary_output() 66 ehdr->e_version = EV_CURRENT; in prepare_binary_output() 69 ehdr->e_machine = machine; in prepare_binary_output() 71 ehdr->e_ident[EI_CLASS] = klass; in prepare_binary_output() 72 ehdr->e_ident[EI_DATA] = data; in prepare_binary_output() 74 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG); in prepare_binary_output() 77 (void) gelf_update_ehdr (result->out.elf, ehdr); in prepare_binary_output()
|