Home | History | Annotate | Download | only in libelf

Lines Matching refs:elf

1 /* Return number of sections in the ELF file.
30 elf_getshnum (elf, dst)
31 Elf *elf;
37 if (elf == NULL)
40 if (unlikely (elf->kind != ELF_K_ELF))
46 rwlock_rdlock (elf->lock);
48 idx = elf->state.elf.scns_last->cnt;
50 || (elf->state.elf.scns_last
51 != (elf->class == ELFCLASS32
52 || (offsetof (Elf, state.elf32.scns)
53 == offsetof (Elf, state.elf64.scns))
54 ? &elf->state.elf32.scns : &elf->state.elf64.scns)))
56 *dst = 1 + elf->state.elf.scns_last->data[idx - 1].index;
60 rwlock_unlock (elf->lock);