Home | History | Annotate | Download | only in libelf

Lines Matching refs:elf

1 /* Return number of sections in the ELF file.
63 __elf_getshnum_rdlock (elf, dst)
64 Elf *elf;
70 if (elf == NULL)
73 if (unlikely (elf->kind != ELF_K_ELF))
79 idx = elf->state.elf.scns_last->cnt;
81 || (elf->state.elf.scns_last
82 != (elf->class == ELFCLASS32
83 || (offsetof (Elf, state.elf32.scns)
84 == offsetof (Elf, state.elf64.scns))
85 ? &elf->state.elf32.scns : &elf->state.elf64.scns)))
87 *dst = 1 + elf->state.elf.scns_last->data[idx - 1].index;
95 elf_getshnum (elf, dst)
96 Elf *elf;
101 if (elf == NULL)
104 rwlock_rdlock (elf->lock);
105 result = __elf_getshnum_rdlock (elf, dst);
106 rwlock_unlock (elf->lock);