/external/elfutils/libelf/ |
gelf_update_ehdr.c | 58 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));
|
gelf_getehdr.c | 57 /* 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));
|
/external/elfutils/backends/ |
ppc64_resolve_sym.c | 49 GElf_Ehdr ehdr_mem, *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem); local 50 if (ehdr != NULL) 58 ehdr->e_ident[EI_DATA]) != NULL)
|
ppc64_init.c | 80 GElf_Ehdr ehdr_mem, *ehdr = gelf_getehdr (elf, &ehdr_mem); local 81 if (ehdr != NULL && ehdr->e_type != ET_REL) 94 const char *name = elf_strptr (elf, ehdr->e_shstrndx,
|
/external/elfutils/tests/ |
update1.c | 38 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->e_shoff, ehdr->e_flags, ehdr->e_ehsize [all...] |
update2.c | 38 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->e_shoff, ehdr->e_flags, ehdr->e_ehsize [all...] |
scnnames.c | 32 GElf_Ehdr ehdr; local 64 if (gelf_getehdr (elf, &ehdr) == NULL) 70 strndx = ehdr.e_shstrndx;
|
alldts.c | 90 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->e_shnum = 3 [all...] |
ecp.c | 58 GElf_Ehdr *ehdr; local 59 gelf_update_ehdr (outelf, (ehdr = gelf_getehdr (inelf, &ehdr_mem))); 61 if (ehdr->e_phnum > 0) 65 if (gelf_newphdr (outelf, ehdr->e_phnum) == 0) 69 for (cnt = 0; cnt < ehdr->e_phnum; ++cnt)
|
elfshphehdr.c | 1 /* 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.e_machine = EM_386 [all...] |
newfile.c | 26 print_ehdr (Elf32_Ehdr *ehdr) 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->e_ehsize 85 Elf32_Ehdr *ehdr = elf32_getehdr (elf); local [all...] |
saridx.c | 194 GElf_Ehdr ehdr; local 197 if (gelf_getehdr (subelf, &ehdr) == NULL) 202 ehdr.e_ident[EI_CLASS] == ELFCLASS32 205 ehdr.e_ident[EI_DATA] == ELFDATA2LSB 208 ehdr.e_type == ET_REL 210 : (ehdr.e_type == ET_EXEC 212 : (ehdr.e_type == ET_DYN 216 (ehdr.e_machine >= (sizeof (machines) 218 || machines[ehdr.e_machine] == NULL) 220 : machines[ehdr.e_machine]) [all...] |
showptable.c | 32 GElf_Ehdr ehdr; local 63 if (gelf_getehdr (elf, &ehdr) == NULL) 76 for (cnt = 0; cnt < ehdr.e_phnum; ++cnt)
|
update3.c | 40 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->e_shoff, ehdr->e_flags, ehdr->e_ehsize [all...] |
update4.c | 40 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->e_shoff, ehdr->e_flags, ehdr->e_ehsize [all...] |
/external/elfutils/libasm/ |
asm_begin.c | 72 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...] |
/external/elfutils/libdwelf/ |
dwelf_elf_gnu_debuglink.c | 88 GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); local 89 if (ehdr == NULL) 92 Elf_Data *d = gelf_xlatetom (elf, &crcdata, &conv, ehdr->e_ident[EI_DATA]);
|
/external/syslinux/gpxe/src/arch/i386/image/ |
elfboot.c | 75 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/libunwind/src/ia64/ |
Gfind_unwind_table.c | 39 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->e_shentsize) 100 Elf64_Ehdr *ehdr; local [all...] |
/external/syslinux/gpxe/src/image/ |
elf.c | 47 * @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.e_ident[EI_MAG0], ELFMAG, SELFMAG ) != 0 ) [all...] |
/external/tcpdump/ |
print-ipfc.c | 95 struct ether_header ehdr; local 106 extract_ipfc_addrs(ipfcp, (char *)ESRC(&ehdr), (char *)EDST(&ehdr)); 109 ipfc_hdr_print(ndo, ipfcp, length, ESRC(&ehdr), EDST(&ehdr)); 111 src.addr = ESRC(&ehdr); 113 dst.addr = EDST(&ehdr);
|
/system/core/libunwindstack/tests/ |
ElfTestUtils.cpp | 36 template <typename Ehdr> 37 void TestInitEhdr(Ehdr* ehdr, uint32_t elf_class, uint32_t machine_type) { 38 memset(ehdr, 0, sizeof(Ehdr)); 39 memcpy(&ehdr->e_ident[0], ELFMAG, SELFMAG); 40 ehdr->e_ident[EI_DATA] = ELFDATA2LSB; 41 ehdr->e_ident[EI_VERSION] = EV_CURRENT; 42 ehdr->e_ident[EI_OSABI] = ELFOSABI_SYSV; 43 ehdr->e_ident[EI_CLASS] = elf_class 62 Ehdr ehdr; local [all...] |
MapInfoCreateMemoryTest.cpp | 43 template <typename Ehdr, typename Shdr> 48 Ehdr ehdr; local 49 memset(&ehdr, 0, sizeof(ehdr)); 50 memcpy(ehdr.e_ident, ELFMAG, SELFMAG); 51 ehdr.e_ident[EI_CLASS] = class_type; 52 ehdr.e_shoff = sh_offset; 53 ehdr.e_shentsize = sizeof(Shdr) + 100; 54 ehdr.e_shnum = 4 [all...] |
MapInfoGetElfTest.cpp | 52 template <typename Ehdr, typename Shdr> 53 static void InitElf(uint64_t sh_offset, Ehdr* ehdr, uint8_t class_type, uint8_t machine_type) { 54 memset(ehdr, 0, sizeof(*ehdr)); 55 memcpy(ehdr->e_ident, ELFMAG, SELFMAG); 56 ehdr->e_ident[EI_CLASS] = class_type; 57 ehdr->e_machine = machine_type; 58 ehdr->e_shoff = sh_offset; 59 ehdr->e_shentsize = sizeof(Shdr) + 100 83 Elf32_Ehdr ehdr; local 97 Elf64_Ehdr ehdr; local 175 Elf32_Ehdr ehdr; local 204 Elf32_Ehdr ehdr; local 233 Elf32_Ehdr ehdr; local 263 Elf32_Ehdr ehdr; local 291 Elf64_Ehdr ehdr; local 318 Elf64_Ehdr ehdr; local 340 Elf64_Ehdr ehdr; local 367 Elf64_Ehdr ehdr; local [all...] |
/external/elfutils/libdw/ |
dwarf_begin_elf.c | 68 check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp) 98 const char *scnname = elf_strptr (result->elf, ehdr->e_shstrndx, 217 global_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr) 222 result = check_section (result, ehdr, scn, false); 229 scngrp_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr, Elf_Scn *scngrp) 278 result = check_section (result, ehdr, scn, true); 290 GElf_Ehdr *ehdr; local 295 ehdr = gelf_getehdr (elf, &ehdr_mem); 296 if (ehdr == NULL) 322 if ((BYTE_ORDER == LITTLE_ENDIAN && ehdr->e_ident[EI_DATA] == ELFDATA2MSB [all...] |