Searched defs:elf (Results 1 - 25 of 56) sorted by relevance

123

/external/elfutils/libelf/
H A Delf_clone.c29 elf_clone (Elf *elf, Elf_Cmd cmd) argument
33 if (elf == NULL)
38 rwlock_rdlock (elf->lock);
44 retval = allocate_elf (elf->fildes, elf->map_address, elf->start_offset,
45 elf->maximum_size, elf->cmd, elf->parent, elf
[all...]
H A Dgelf_getmove.c36 Elf *elf; local
59 elf = ((Elf_Data_Scn *) data)->s->elf;
60 rwlock_rdlock (elf->lock);
64 rwlock_unlock (elf->lock);
H A Dgelf_getdyn.c37 Elf *elf; local
48 elf = data_scn->s->elf;
50 rwlock_rdlock (elf->lock);
55 if (elf->class == ELFCLASS32)
96 rwlock_unlock (elf->lock);
H A Delf32_getshdr.c42 if (unlikely (scn->elf->state.elf.ehdr == NULL))
48 if (unlikely (scn->elf->class != ELFW(ELFCLASS,LIBELFBITS)))
58 Elf *elf = scn->elf; local
59 ElfW2(LIBELFBITS,Ehdr) *ehdr = elf->state.ELFW(elf,LIBELFBITS).ehdr;
65 rwlock_wrlock (elf->lock);
72 if (INTUSE (elf_getshnum) (elf, &shnum) != 0)
78 shdr = elf
[all...]
H A Delf_readall.c29 set_address (Elf *elf, size_t offset) argument
31 if (elf->kind == ELF_K_AR)
33 Elf *child = elf->state.ar.children;
39 child->map_address = elf->map_address;
54 __libelf_readall (elf)
55 Elf *elf;
58 rwlock_wrlock (elf->lock);
60 if (elf->map_address == NULL && unlikely (elf->fildes == -1))
63 rwlock_unlock (elf
[all...]
H A Delf_update.c30 write_file (Elf *elf, off_t size, int change_bo, size_t shnum) argument
32 int class = elf->class;
39 if (elf->parent == NULL
40 && (elf->maximum_size == ~((size_t) 0) || size > elf->maximum_size)
41 && unlikely (ftruncate (elf->fildes, size) != 0))
48 if (elf->map_address == NULL && elf->cmd == ELF_C_WRITE_MMAP)
50 elf->map_address = mmap (NULL, size, PROT_READ | PROT_WRITE,
51 MAP_SHARED, elf
[all...]
H A Dgelf_update_ehdr.c29 gelf_update_ehdr (Elf *elf, GElf_Ehdr *src) argument
33 if (elf == NULL)
36 if (unlikely (elf->kind != ELF_K_ELF))
42 rwlock_wrlock (elf->lock);
44 if (elf->class == ELFCLASS32)
46 Elf32_Ehdr *ehdr = elf->state.elf32.ehdr;
85 Elf64_Ehdr *ehdr = elf->state.elf64.ehdr;
100 rwlock_unlock (elf->lock);
H A Dgelf_update_phdr.c29 gelf_update_phdr (Elf *elf, int ndx, GElf_Phdr *src) argument
33 if (elf == NULL)
36 if (unlikely (elf->kind != ELF_K_ELF))
42 rwlock_wrlock (elf->lock);
44 if (elf->class == ELFCLASS32)
46 Elf32_Phdr *phdr = elf->state.elf32.phdr;
64 phdr = INTUSE(elf32_getphdr) (elf);
71 if (unlikely (ndx >= elf->state.elf32.ehdr->e_phnum))
93 Elf64_Phdr *phdr = elf->state.elf64.phdr;
97 phdr = INTUSE(elf64_getphdr) (elf);
[all...]
H A Dgelf_update_shdr.c32 Elf *elf; local
37 elf = scn->elf;
38 rwlock_wrlock (elf->lock);
40 if (elf->class == ELFCLASS32)
91 rwlock_unlock (elf->lock);
/external/elfutils/libdw/
H A Ddwarf_begin.c31 Elf *elf; local
59 elf = elf_begin (fd, elfcmd, NULL);
60 if (elf == NULL)
75 result = dwarf_begin_elf (elf, cmd, NULL);
79 elf_end (elf);
/external/elfutils/tests/
H A Dnewscn.c24 Elf *elf; local
43 elf = elf_begin (fd, ELF_C_WRITE, NULL);
44 if (elf == NULL)
50 section = elf_newscn (elf);
51 section = elf_nextscn (elf, section);
54 elf_end (elf);
H A Darsymtest.c28 Elf *elf; local
55 elf = elf_begin (fd, ELF_C_READ, NULL);
56 if (elf == NULL)
63 if (elf_kind (elf) != ELF_K_AR)
70 arsym = elf_getarsym (elf, &narsym);
86 if (elf_rand (elf, arsym[narsym].as_off) != arsym[narsym].as_off)
93 subelf = elf_begin (fd, ELF_C_READ, elf);
122 if (elf_end (elf) != 0)
H A Dscnnames.c26 Elf *elf; local
41 elf = elf_begin (fd, ELF_C_READ, NULL);
42 if (elf == NULL)
48 if (elf_kind (elf) != ELF_K_ELF)
54 if (gelf_getehdr (elf, &ehdr) == NULL)
63 while ((scn = elf_nextscn (elf, scn)) != NULL)
69 name = elf_strptr (elf, strndx, (size_t) shdr.sh_name);
74 if (elf_end (elf) != 0)
H A Dupdate1.c32 Elf *elf; local
45 elf = elf_begin (fd, ELF_C_WRITE, NULL);
46 if (elf == NULL)
53 ehdr = elf32_newehdr (elf);
84 if (elf_update (elf, ELF_C_WRITE) < 0)
91 ehdr = elf32_newehdr (elf);
113 if (elf_end (elf) != 0)
H A Dupdate2.c32 Elf *elf; local
46 elf = elf_begin (fd, ELF_C_WRITE, NULL);
47 if (elf == NULL)
54 ehdr = elf32_newehdr (elf);
83 elf_flagehdr (elf, ELF_C_SET, ELF_F_DIRTY);
86 phdr = elf32_newphdr (elf, 1);
94 elf_flagphdr (elf, ELF_C_SET, ELF_F_DIRTY);
97 if (elf_update (elf, ELF_C_NULL) < 0)
103 ehdr = elf32_getehdr (elf);
115 if (elf_update (elf, ELF_C_WRIT
[all...]
H A Darextract.c31 Elf *elf; local
53 elf = elf_begin (fd, cmd, NULL);
54 if (elf == NULL)
61 if (elf_kind (elf) != ELF_K_AR)
68 while ((subelf = elf_begin (fd, cmd, elf)) != NULL)
128 if (elf_end (subelf) != 0 || elf_end (elf) != 0)
H A Dasm-tst1.c61 Elf *elf; local
110 elf = elf_begin (fd, ELF_C_READ, NULL);
111 if (elf == NULL)
117 if (elf_kind (elf) != ELF_K_ELF)
124 ehdr = gelf_getehdr (elf, &ehdr_mem);
145 scn = elf_getscn (elf, cnt);
162 if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
166 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
231 elf_end (elf);
H A Dasm-tst2.c61 Elf *elf; local
126 elf = elf_begin (fd, ELF_C_READ, NULL);
127 if (elf == NULL)
133 if (elf_kind (elf) != ELF_K_ELF)
140 ehdr = gelf_getehdr (elf, &ehdr_mem);
161 scn = elf_getscn (elf, cnt);
178 if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
182 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
253 elf_end (elf);
H A Dasm-tst7.c31 Elf *elf; local
67 elf = elf_begin (fd, ELF_C_READ, NULL);
68 if (elf == NULL)
74 if (elf_kind (elf) != ELF_K_ELF)
87 scn = elf_getscn (elf, cnt);
108 / gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT));
156 elf_end (elf);
H A Dasm-tst8.c31 Elf *elf; local
68 elf = elf_begin (fd, ELF_C_READ, NULL);
69 if (elf == NULL)
75 if (elf_kind (elf) != ELF_K_ELF)
88 scn = elf_getscn (elf, cnt);
109 / gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT));
164 elf_end (elf);
/external/elfcopy/
H A Dcommon.c5 void map_over_sections(Elf *elf, argument
10 while ((section = elf_nextscn(elf, section)) != NULL) {
11 if (match(elf, section, user_data))
16 void map_over_segments(Elf *elf, argument
24 ehdr = elf32_getehdr(elf);
25 phdr = elf32_getphdr(elf);
31 if (match(elf, phdr++, user_data))
/external/elfutils/libebl/
H A Di386_symbol.c20 #include <elf.h>
102 i386_reloc_valid_use (Elf *elf, int type) argument
108 Elf32_Ehdr *ehdr = elf32_getehdr (elf);
124 i386_gotpc_reloc_check (Elf *elf, int type) argument
H A Dppc64_symbol.c20 #include <elf.h>
171 ppc64_reloc_valid_use (Elf *elf, int type) argument
177 Elf64_Ehdr *ehdr = elf64_getehdr (elf);
H A Dppc_symbol.c20 #include <elf.h>
132 ppc_reloc_valid_use (Elf *elf, int type) argument
138 Elf32_Ehdr *ehdr = elf32_getehdr (elf);
H A Dx86_64_symbol.c20 #include <elf.h>
90 x86_64_reloc_valid_use (Elf *elf, int type) argument
96 Elf64_Ehdr *ehdr = elf64_getehdr (elf);

Completed in 101 milliseconds

123