Lines Matching defs:elf
193 gethead(Elf *elf)
197 if (!elf) {
199 "elf.so`gethead: argument 'elf' must not be NULL");
208 if (gelf_getehdr(elf, hdr) == 0) {
220 Elf *elf;
235 if (!(elf = elf_begin(fd, ELF_C_READ, NULL))) {
241 if (!(hdr = gethead(elf))) {
242 (void) elf_end(elf);
254 (void) elf_end(elf);
300 * Hashes a range from an mmap'd elf file
325 getelfhash(Elf *elf, char *base, unsigned char *elfhash)
335 if (!elf_getshstrndx(elf, &sh_str)) {
342 while ((scn = elf_nextscn(elf, scn)) != NULL) {
348 if (!(name = elf_strptr(elf, sh_str, shdr.sh_name))) {
389 Elf *elf = NULL;
422 if (!(elf = elf_begin(fd, ELF_C_READ, NULL))) {
427 if (!elf_getshstrndx(elf, &sh_str)) {
433 while ((scn = elf_nextscn(elf, scn)) != NULL) {
439 if (!(name = elf_strptr(elf, sh_str, shdr.sh_name))) {
486 "bad elf: didn't find the dynamic duo");
620 dyn->elf = elf;
633 if (elf)
634 (void) elf_end(elf);
643 (void) elf_end(dyn->elf);
685 Elf *elf;
691 ((elf = elf_begin(fd, ELF_C_READ, NULL)) == NULL) ||
692 (elf_kind(elf) != ELF_K_ELF)) {
741 if (getelfhash(elf, hdata.base, &rawhash[0]) == NULL) {
754 !gelf_sign_range(elf, elf_contenthash_cb,
800 !gelf_sign_range(elf, elf_contenthash_cb,
843 (void) elf_end(elf);