/external/elfutils/tests/ |
asm-tst8.c | 47 Elf *elf; local 91 elf = elf_begin (fd, ELF_C_READ, NULL); 92 if (elf == NULL) 94 printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1)); 98 if (elf_kind (elf) != ELF_K_ELF) 100 puts ("not a valid ELF file"); 111 scn = elf_getscn (elf, cnt); 132 / gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT)); 187 elf_end (elf); [all...] |
newfile.c | 63 Elf *elf; local 78 elf = elf_begin (fd, ELF_C_WRITE, NULL); 79 if (elf == NULL) 86 if (elf32_newehdr (elf) == NULL) 93 Elf32_Ehdr *ehdr = elf32_getehdr (elf); 138 if (elf32_newphdr (elf, 10) == NULL) 148 ehdr = elf32_getehdr (elf); 174 (void) elf_end (elf);
|
showptable.c | 38 Elf *elf; local 58 elf = elf_begin (fd, ELF_C_READ, NULL); 59 if (elf == NULL) 61 printf ("cannot open ELF file: %s\n", elf_errmsg (-1)); 65 if (elf_kind (elf) != ELF_K_ELF) 67 printf ("\"%s\" is not an ELF file\n", argv[1]); 71 if (gelf_getehdr (elf, &ehdr) == NULL) 73 printf ("cannot get the ELF header: %s\n", elf_errmsg (-1)); 78 gelf_getclass (elf) == ELFCLASS32 ? 9 : 17, "offset" [all...] |
update2.c | 44 Elf *elf; local 58 elf = elf_begin (fd, ELF_C_WRITE, NULL); 59 if (elf == NULL) 61 printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1)); 65 /* Create an ELF header. */ 66 ehdr = elf32_newehdr (elf); 69 printf ("cannot create ELF header: %s\n", elf_errmsg (-1)); 73 /* Print the ELF header values. */ 95 elf_flagehdr (elf, ELF_C_SET, ELF_F_DIRTY) [all...] |
asm-tst1.c | 77 Elf *elf; local 133 elf = elf_begin (fd, ELF_C_READ, NULL); 134 if (elf == NULL) 136 printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1)); 140 if (elf_kind (elf) != ELF_K_ELF) 142 puts ("not a valid ELF file"); 147 ehdr = gelf_getehdr (elf, &ehdr_mem); 150 printf ("cannot get ELF header: %s\n", elf_errmsg (-1)); 157 puts ("ELF header does not match") [all...] |
asm-tst2.c | 77 Elf *elf; local 149 elf = elf_begin (fd, ELF_C_READ, NULL); 150 if (elf == NULL) 152 printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1)); 156 if (elf_kind (elf) != ELF_K_ELF) 158 puts ("not a valid ELF file"); 163 ehdr = gelf_getehdr (elf, &ehdr_mem); 166 printf ("cannot get ELF header: %s\n", elf_errmsg (-1)); 173 puts ("ELF header does not match") [all...] |
update3.c | 46 Elf *elf; local 67 elf = elf_begin (fd, ELF_C_WRITE, NULL); 68 if (elf == NULL) 70 printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1)); 74 /* Create an ELF header. */ 75 ehdr = elf32_newehdr (elf); 78 printf ("cannot create ELF header: %s\n", elf_errmsg (-1)); 82 /* Print the ELF header values. */ 104 elf_flagehdr (elf, ELF_C_SET, ELF_F_DIRTY) [all...] |
/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/ |
link.h | 2 loaded ELF shared objects. 25 #include <elf.h> 29 /* We use this macro to refer to ELF types independent of the native wordsize. 31 #define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type)
|
/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/ |
link.h | 2 loaded ELF shared objects. 25 #include <elf.h> 29 /* We use this macro to refer to ELF types independent of the native wordsize. 31 #define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type)
|
/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/sysroot/usr/include/ |
link.h | 2 loaded ELF shared objects. 25 #include <elf.h> 29 /* We use this macro to refer to ELF types independent of the native wordsize. 31 #define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type)
|
/external/elfutils/src/ |
ar.c | 390 open_archive (const char *arfname, int flags, int mode, Elf **elf, 403 if (elf != NULL) 407 *elf = elf_begin (fd, cmd, NULL); 408 if (*elf == NULL) 412 if (flags == O_RDONLY && elf_kind (*elf) != ELF_K_AR) 434 copy_content (Elf *elf, int newfd, off_t off, size_t n) 437 char *rawfile = elf_rawfile (elf, &len); 465 Elf *elf local 831 Elf *elf; member in struct:armem 908 Elf *elf; local 1082 Elf *elf; local [all...] |
elfcmp.c | 1 /* Compare relevant content of two ELF files. 44 #include "../libelf/elf-knowledge.h" 49 static Elf *open_file (const char *fname, int *fdp, Ebl **eblp); 80 Compare relevant parts of two ELF files for equality."); 157 Elf *elf1 = open_file (fname1, &fd1, &ebl1); 162 Elf *elf2 = open_file (fname2, &fd2, &ebl2); 167 error (EXIT_FAILURE, 0, gettext ("cannot get ELF header of '%s': %s"), 172 error (EXIT_FAILURE, 0, gettext ("cannot get ELF header of '%s': %s"), 175 /* Compare the ELF headers. */ 189 error (0, 0, gettext ("%s %s diff: ELF header"), fname1, fname2) 574 Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL); local [all...] |
unstrip.c | 252 copy_elf (Elf *outelf, Elf *inelf) 255 _("cannot create ELF header: %s")); 260 _("cannot copy ELF header: %s")); 339 symtab_count_leading_section_symbols (Elf *elf, Elf_Scn *scn, size_t shnum, 353 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (elf, i), &shdr_mem); 527 adjust_all_relocs (Elf *elf, Elf_Scn *symtab, const GElf_Shdr *symshdr, 532 while ((scn = elf_nextscn (elf, scn)) != NULL [all...] |
objdump.c | 1 /* Print information from ELF file in human-readable form. 96 static int handle_ar (int fd, Elf *elf, const char *prefix, const char *fname, 99 /* Handle ELF file. */ 100 static int handle_elf (Elf *elf, const char *prefix, const char *fname, 261 /* Now get the ELF descriptor. */ 262 Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL); local 263 if (elf != NULL [all...] |
/external/elfutils/libdwfl/ |
dwfl_report_elf.c | 1 /* Report a module to libdwfl based on ELF program headers. 65 int fd, Elf *elf, GElf_Addr base) 67 GElf_Ehdr ehdr_mem, *ehdr = gelf_getehdr (elf, &ehdr_mem); 87 while ((scn = elf_nextscn (elf, scn)) != NULL) 121 prev_scn = elf_nextscn (elf, prev_scn); 193 GElf_Phdr phdr_mem, *ph = gelf_getphdr (elf, i, &phdr_mem); 208 GElf_Phdr phdr_mem, *ph = gelf_getphdr (elf, i, &phdr_mem); 237 elf_end (elf); 244 /* Preinstall the open ELF handle for the module. * 277 Elf *elf = elf_begin (fd, ELF_C_READ_MMAP_PRIVATE, NULL); local [all...] |
linux-proc-maps.c | 278 extern Elf *elf_from_remote_memory (GElf_Addr ehdr_vma, 294 char **file_name, Elf **elfp) 314 /* Special case for in-memory ELF image. */
|
dwfl_module_build_id.c | 98 __libdwfl_find_build_id (Dwfl_Module *mod, bool set, Elf *elf) 102 Elf_Scn *scn = elf_nextscn (elf, NULL); 108 GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); 117 GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem); 120 elf_getdata_rawchunk (elf, 137 while (result == 0 && (scn = elf_nextscn (elf, scn)) != NULL); 157 if (mod->build_id_len == 0 && mod->main.elf != NULL) 160 int result = __libdwfl_find_build_id (mod, true, mod->main.elf);
|
elf-from-memory.c | 1 /* Reconstruct an ELF file by reading the segments out of remote memory. 62 /* Reconstruct an ELF file by reading the segments out of remote memory 63 based on the ELF file header at EHDR_VMA and the ELF program headers it 74 Elf * 357 Elf *elf = elf_memory ((char *) buffer, contents_size); local 358 if (elf == NULL) 364 elf->flags |= ELF_F_MALLOCED; 367 return elf; [all...] |
dwfl_module_getdwarf.c | 56 /* Open libelf FILE->fd and compute the load base of ELF as loaded in MOD. 57 When we return success, FILE->elf and FILE->bias are set up. */ 61 if (file->elf == NULL) 71 file->elf = elf_begin (file->fd, ELF_C_READ_MMAP_PRIVATE, NULL); 74 if (unlikely (elf_kind (file->elf) != ELF_K_ELF)) 81 GElf_Ehdr ehdr_mem, *ehdr = gelf_getehdr (file->elf, &ehdr_mem); 99 GElf_Phdr *ph = gelf_getphdr (file->elf, i, &ph_mem); 119 /* Find the main ELF file for this module and open libelf on it. 120 When we return success, MOD->main.elf and MOD->main.bias are set up. */ 124 if (mod->main.elf != NULL /* Already done. * [all...] |
/external/elfutils/libelf/ |
elf32_getphdr.c | 1 /* Get ELF program header table. 70 __elfw2(LIBELFBITS,getphdr_wrlock) (elf) 71 Elf *elf; 78 result = elf->state.ELFW(elf,LIBELFBITS).phdr; 82 if (elf->class == 0) 83 elf->class = ELFW(ELFCLASS,LIBELFBITS); 84 else if (elf->class != ELFW(ELFCLASS,LIBELFBITS)) 94 ElfW2(LIBELFBITS,Ehdr) *ehdr = elf->state.ELFW(elf,LIBELFBITS).ehdr [all...] |
elf32_newphdr.c | 1 /* Create new ELF program header table. 67 elfw2(LIBELFBITS,newphdr) (elf, count) 68 Elf *elf; 73 if (elf == NULL) 76 if (unlikely (elf->kind != ELF_K_ELF)) 82 rwlock_wrlock (elf->lock); 84 if (elf->class == 0) 85 elf->class = ELFW(ELFCLASS,LIBELFBITS); 86 else if (unlikely (elf->class != ELFW(ELFCLASS,LIBELFBITS)) [all...] |
elf_getdata_rawchunk.c | 1 /* Return converted data from raw chunk of ELF file. 65 elf_getdata_rawchunk (elf, offset, size, type) 66 Elf *elf; 77 if (unlikely (elf == NULL)) 80 if (unlikely (elf->kind != ELF_K_ELF)) 89 if (unlikely (size > elf->maximum_size 90 || (off64_t) (elf->maximum_size - size) < offset)) 92 if (unlikely (size > elf->maximum_size 93 || (off_t) (elf->maximum_size - size) < offset) [all...] |
nlist.c | 84 Elf *elf; local 102 /* For compatibility reasons (`nlist' existed before ELF and libelf) 103 we don't expect the caller to set the ELF version. Do this here 108 /* Now get an ELF descriptor. */ 109 elf = INTUSE(elf_begin) (fd, ELF_C_READ_MMAP, NULL); 110 if (elf == NULL) 115 while ((scn = INTUSE(elf_nextscn) (elf, scn)) != NULL) 150 / INTUSE(gelf_fsize) (elf, ELF_T_SYM, 1, data->d_version)); 172 mem.str = INTUSE(elf_strptr) (elf, shdr->sh_link, sym->st_name) [all...] |
elf32_updatenull.c | 63 #include "elf-knowledge.h" 72 ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr, 79 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; 84 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags); 91 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; 104 /* Unconditionally overwrite the ELF version. * [all...] |
/external/elfutils/backends/ |
common-reloc.c | 99 EBLHOOK(reloc_valid_use) (Elf *elf, int reloc) 104 GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
|