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

1234567

/external/elfutils/libelf/
H A Delf_getaroff.c42 elf_getaroff (Elf *elf) argument
45 if (elf == NULL || elf->parent == NULL)
49 Elf *parent = elf->parent;
52 return elf->start_offset - sizeof (struct ar_hdr) - parent->start_offset;
H A Delf_getbase.c41 elf_getbase (Elf *elf) argument
43 return elf == NULL ? (off_t) -1 : elf->start_offset;
H A Delf_kind.c41 elf_kind (Elf *elf) argument
43 return elf == NULL ? ELF_K_NONE : elf->kind;
H A Dgelf_checksum.c41 gelf_checksum (Elf *elf) argument
43 if (elf == NULL)
46 return (elf->class == ELFCLASS32
47 ? INTUSE(elf32_checksum) (elf) : INTUSE(elf64_checksum) (elf));
H A Dgelf_getclass.c41 gelf_getclass (Elf *elf) argument
43 return elf == NULL || elf->kind != ELF_K_ELF ? ELFCLASSNONE : elf->class;
H A Delf_clone.c41 elf_clone (Elf *elf, Elf_Cmd cmd) argument
45 if (elf == NULL)
50 rwlock_rdlock (elf->lock);
56 retval = allocate_elf (elf->fildes, elf->map_address, elf->start_offset,
57 elf->maximum_size, elf->cmd, elf->parent, elf
[all...]
H A Delf_cntl.c40 elf_cntl (Elf *elf, Elf_Cmd cmd) argument
44 if (elf == NULL)
47 if (elf->fildes == -1)
53 rwlock_wrlock (elf->lock);
59 if (elf->map_address == NULL && __libelf_readall (elf) == NULL)
69 elf->fildes = -1;
78 rwlock_unlock (elf->lock);
H A Delf_getarhdr.c42 elf_getarhdr (Elf *elf) argument
44 if (elf == NULL)
47 Elf *parent = elf->parent;
H A Delf_getident.c40 elf_getident (Elf *elf, size_t *ptr) argument
44 if (elf == NULL || elf->kind != ELF_K_ELF)
56 return (char *) (elf->class == ELFCLASS32
59 ? elf->state.elf32.ehdr->e_ident
60 : elf->state.elf64.ehdr->e_ident);
H A Delf_next.c42 elf_next (Elf *elf) argument
48 if (elf == NULL || elf->parent == NULL)
52 parent = elf->parent;
63 ret = __libelf_next_arhdr_wrlock (parent) != 0 ? ELF_C_NULL : elf->cmd;
H A Delf_rand.c41 elf_rand (Elf *elf, size_t offset) argument
44 if (elf == NULL || elf->kind != ELF_K_AR)
47 rwlock_wrlock (elf->lock);
50 elf->state.ar.offset = elf->start_offset + offset;
53 if (__libelf_next_arhdr_wrlock (elf) != 0)
56 elf->state.ar.elf_ar_hdr.ar_name = NULL;
60 rwlock_unlock (elf->lock);
H A Delf_rawfile.c41 elf_rawfile (Elf *elf, size_t *ptr) argument
45 if (elf == NULL)
56 if (elf->map_address == NULL && __libelf_readall (elf) == NULL)
59 rwlock_rdlock (elf->lock);
61 *ptr = elf->maximum_size;
63 result = (char *) elf->map_address + elf->start_offset;
64 rwlock_unlock (elf->lock);
H A Dgelf_newehdr.c41 gelf_newehdr (Elf *elf, int class) argument
44 ? (unsigned long int) INTUSE(elf32_newehdr) (elf)
45 : (unsigned long int) INTUSE(elf64_newehdr) (elf));
H A Dgelf_newphdr.c41 gelf_newphdr ( Elf *elf, size_t phnum) argument
43 return (elf->class == ELFCLASS32
44 ? (unsigned long int) INTUSE(elf32_newphdr) (elf, phnum)
45 : (unsigned long int) INTUSE(elf64_newphdr) (elf, phnum));
H A Dgelf_offscn.c41 gelf_offscn (Elf *elf, GElf_Off offset) argument
43 if (elf->class == ELFCLASS32)
51 return INTUSE(elf32_offscn) (elf, (Elf32_Off) offset);
54 return INTUSE(elf64_offscn) (elf, offset);
H A Delf_flagehdr.c41 elf_flagehdr (Elf *elf, Elf_Cmd cmd, unsigned int flags) argument
45 if (elf == NULL)
48 if (unlikely (elf->kind != ELF_K_ELF))
55 result = (elf->state.elf.ehdr_flags |= (flags & ELF_F_DIRTY));
57 result = (elf->state.elf.ehdr_flags &= ~(flags & ELF_F_DIRTY));
H A Delf_flagelf.c41 elf_flagelf (Elf *elf, Elf_Cmd cmd, unsigned int flags) argument
45 if (elf == NULL)
48 if (unlikely (elf->kind != ELF_K_ELF))
55 result = (elf->flags
58 result = (elf->flags
H A Delf_flagphdr.c41 elf_flagphdr (Elf *elf, Elf_Cmd cmd, unsigned int flags) argument
45 if (elf == NULL)
48 if (unlikely (elf->kind != ELF_K_ELF))
55 result = (elf->state.elf.phdr_flags |= (flags & ELF_F_DIRTY));
57 result = (elf->state.elf.phdr_flags &= ~(flags & ELF_F_DIRTY));
H A Delf_getscn.c42 elf_getscn (Elf *elf, size_t idx) argument
44 if (elf == NULL)
47 if (unlikely (elf->kind != ELF_K_ELF))
53 rwlock_rdlock (elf->lock);
58 Elf_ScnList *runp = (elf->class == ELFCLASS32
61 ? &elf->state.elf32.scns : &elf->state.elf64.scns);
83 rwlock_unlock (elf->lock);
H A Delf_newscn.c44 elf_newscn (Elf *elf) argument
49 if (elf == NULL)
52 /* We rely on the prefix of the `elf', `elf32', and `elf64' element
54 assert (offsetof (Elf, state.elf.scns_last)
56 assert (offsetof (Elf, state.elf.scns_last)
61 rwlock_wrlock (elf->lock);
64 if (elf->state.elf.scns_last->cnt < elf->state.elf
[all...]
H A Delf_nextscn.c42 elf_nextscn (Elf *elf, Elf_Scn *scn) argument
46 if (elf == NULL)
49 rwlock_rdlock (elf->lock);
54 if (elf->class == ELFCLASS32
58 if (elf->state.elf32.scns.cnt > 1)
59 result = &elf->state.elf32.scns.data[1];
63 if (elf->state.elf64.scns.cnt > 1)
64 result = &elf->state.elf64.scns.data[1];
83 rwlock_unlock (elf->lock);
H A Dgelf_xlatetof.c41 gelf_xlatetof (Elf *elf, Elf_Data *dest, const Elf_Data * src, argument
44 if (elf == NULL)
47 return (elf->class == ELFCLASS32
H A Dgelf_xlatetom.c41 gelf_xlatetom (Elf *elf, Elf_Data *dest, const Elf_Data * src, argument
44 if (elf == NULL)
47 return (elf->class == ELFCLASS32
/external/elfutils/libasm/
H A Ddisasm_begin.c41 disasm_begin (Ebl *ebl, Elf *elf, DisasmGetSymCB_t symcb) argument
60 ctx->elf = elf;
/external/elfutils/tests/
H A Dnewscn.c32 Elf *elf; local
51 elf = elf_begin (fd, ELF_C_WRITE, NULL);
52 if (elf == NULL)
58 section = elf_newscn (elf);
59 section = elf_nextscn (elf, section);
62 elf_end (elf);

Completed in 236 milliseconds

1234567