Lines Matching refs:elf

1170  * The text segment for each load object contains the elf header and
1182 * We're looking through the elf file for several items: the symbol tables
1192 * reasaon, we fake up a elf file to use in its stead. If we can't read
1193 * the elf data in the process's address space, we fall back to using
1196 * The elf file that we fake up has to consist of sections for the
1205 file_differs(struct ps_prochandle *P, Elf *elf, file_info_t *fptr)
1223 * First, we find the checksum value in the elf file.
1226 while ((scn = elf_nextscn(elf, scn)) != NULL) {
1260 dprintf("elf cksum value is %llx\n", (u_longlong_t)cksum);
1350 Elf *elf;
1371 elf = fake_elf32(P, fptr, addr, &ehdr, phnum, &phdr);
1381 elf = fake_elf64(P, fptr, addr, &ehdr, phnum, &phdr);
1385 return (elf);
1596 Elf *elf;
1598 if ((elf = fake_elf(P, fptr)) == NULL ||
1599 elf_kind(elf) != ELF_K_ELF ||
1600 gelf_getehdr(elf, ehdr) == NULL ||
1601 elf_getshdrnum(elf, nshdrs) == -1 ||
1602 elf_getshdrstrndx(elf, &shstrndx) == -1 ||
1603 (scn = elf_getscn(elf, shstrndx)) == NULL ||
1605 if (elf != NULL)
1606 (void) elf_end(elf);
1611 return (elf);
1628 Elf *elf;
1679 * Open the object file, create the elf file, and then get the elf
1681 * name. If anything goes wrong try to fake up an elf file from
1682 * the in-core elf image.
1689 if ((elf = build_fake_elf(P, fptr, &ehdr, &nshdrs, &shdata)) ==
1697 if ((elf = build_fake_elf(P, fptr, &ehdr, &nshdrs, &shdata)) ==
1701 } else if ((elf = elf_begin(fptr->file_fd, ELF_C_READ, NULL)) == NULL ||
1702 elf_kind(elf) != ELF_K_ELF ||
1703 gelf_getehdr(elf, &ehdr) == NULL ||
1704 elf_getshdrnum(elf, &nshdrs) == -1 ||
1705 elf_getshdrstrndx(elf, &shstrndx) == -1 ||
1706 (scn = elf_getscn(elf, shstrndx)) == NULL ||
1712 (void) elf_end(elf);
1714 if ((elf = build_fake_elf(P, fptr, &ehdr, &nshdrs, &shdata)) ==
1718 } else if (file_differs(P, elf, fptr)) {
1722 * Before we get too excited about this elf file, we'll check
1724 * they don't agree, we try to fake up a new elf file and
1733 (void) elf_end(elf);
1734 elf = newelf;
1747 fptr->file_elf = elf;
1755 for (cp = cache + 1, scn = NULL; scn = elf_nextscn(elf, scn); cp++) {
1790 * differs in which case our faked up elf file will
1969 (void) elf_end(elf);
2878 * constants in <sys/elf.h>. Changes to ELF must