Lines Matching defs:elf

1125  * The text segment for each load object contains the elf header and
1137 * We're looking through the elf file for several items: the symbol tables
1147 * reasaon, we fake up a elf file to use in its stead. If we can't read
1148 * the elf data in the process's address space, we fall back to using
1151 * The elf file that we fake up has to consist of sections for the
1160 file_differs(struct ps_prochandle *P, Elf *elf, file_info_t *fptr)
1178 * First, we find the checksum value in the elf file.
1181 while ((scn = elf_nextscn(elf, scn)) != NULL) {
1215 dprintf("elf cksum value is %llx\n", (u_longlong_t)cksum);
1305 Elf *elf;
1326 elf = fake_elf32(P, fptr, addr, &ehdr, phnum, &phdr);
1336 elf = fake_elf64(P, fptr, addr, &ehdr, phnum, &phdr);
1340 return (elf);
1551 Elf *elf;
1553 if ((elf = fake_elf(P, fptr)) == NULL ||
1554 elf_kind(elf) != ELF_K_ELF ||
1555 gelf_getehdr(elf, ehdr) == NULL ||
1556 elf_getshdrnum(elf, nshdrs) == -1 ||
1557 elf_getshdrstrndx(elf, &shstrndx) == -1 ||
1558 (scn = elf_getscn(elf, shstrndx)) == NULL ||
1560 if (elf != NULL)
1561 (void) elf_end(elf);
1566 return (elf);
1583 Elf *elf;
1634 * Open the object file, create the elf file, and then get the elf
1636 * name. If anything goes wrong try to fake up an elf file from
1637 * the in-core elf image.
1644 if ((elf = build_fake_elf(P, fptr, &ehdr, &nshdrs, &shdata)) ==
1652 if ((elf = build_fake_elf(P, fptr, &ehdr, &nshdrs, &shdata)) ==
1656 } else if ((elf = elf_begin(fptr->file_fd, ELF_C_READ, NULL)) == NULL ||
1657 elf_kind(elf) != ELF_K_ELF ||
1658 gelf_getehdr(elf, &ehdr) == NULL ||
1659 elf_getshdrnum(elf, &nshdrs) == -1 ||
1660 elf_getshdrstrndx(elf, &shstrndx) == -1 ||
1661 (scn = elf_getscn(elf, shstrndx)) == NULL ||
1667 (void) elf_end(elf);
1669 if ((elf = build_fake_elf(P, fptr, &ehdr, &nshdrs, &shdata)) ==
1673 } else if (file_differs(P, elf, fptr)) {
1677 * Before we get too excited about this elf file, we'll check
1679 * they don't agree, we try to fake up a new elf file and
1688 (void) elf_end(elf);
1689 elf = newelf;
1717 fptr->file_elf = elf;
1725 for (cp = cache + 1, scn = NULL; scn = elf_nextscn(elf, scn); cp++) {
1760 * differs in which case our faked up elf file will
1939 (void) elf_end(elf);
2848 * constants in <sys/elf.h>. Changes to ELF must