Home | History | Annotate | Download | only in libelf

Lines Matching refs:Elf

1 /* Return number of sections in the ELF file.
43 __elf_getshdrnum_rdlock (Elf *elf, size_t *dst)
48 if (elf == NULL)
51 if (unlikely (elf->kind != ELF_K_ELF))
57 idx = elf->state.elf.scns_last->cnt;
59 || (elf->state.elf.scns_last
60 != (elf->class == ELFCLASS32
61 || (offsetof (Elf, state.elf32.scns)
62 == offsetof (Elf, state.elf64.scns))
63 ? &elf->state.elf32.scns : &elf->state.elf64.scns)))
65 *dst = 1 + elf->state.elf.scns_last->data[idx - 1].index;
73 elf_getshdrnum (Elf *elf, size_t *dst)
77 if (elf == NULL)
80 rwlock_rdlock (elf->lock);
81 result = __elf_getshdrnum_rdlock (elf, dst);
82 rwlock_unlock (elf->lock);