• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/dtrace-147/libelf/

Lines Matching defs:elf

160 _elf_upd_lib(Elf * elf)
162 NOTE(ASSUMING_PROTECTED(*elf))
167 Ehdr * eh = elf->ed_ehdr;
206 if ((s = elf->ed_hdscn) == 0) {
234 if ((sz = (Lword)_elf_entsz(elf, sh->sh_type, ver)) != 0)
322 sh = (Shdr *)elf->ed_hdscn->s_shdr;
345 _elf_upd_usr(Elf * elf)
347 NOTE(ASSUMING_PROTECTED(*elf))
351 Ehdr * eh = elf->ed_ehdr;
391 if ((s = elf->ed_hdscn) == 0)
451 wrt(Elf * elf, Xword outsz, unsigned fill, int update_cmd)
453 NOTE(ASSUMING_PROTECTED(*elf))
459 Ehdr *eh = elf->ed_ehdr;
495 if ((elf->ed_myflags & EDF_READ) &&
496 (_elf_vm(elf, (size_t)0, elf->ed_fsz) != OK_YES))
499 flag = elf->ed_myflags & EDF_WRALLOC;
500 if ((image = _elf_outmap(elf->ed_fd, outsz, &flag)) == 0)
504 elf->ed_myflags |= EDF_IMALLOC;
509 * this code sets the dirty bit on the elf descriptor
536 elf->ed_ehflags &= ~ELF_F_DIRTY;
551 src.d_buf = (Elf_Void *)elf->ed_phdr;
553 src.d_size = elf->ed_phdrsz;
560 elf->ed_uflags |= ELF_F_DIRTY;
563 elf->ed_phflags &= ~ELF_F_DIRTY;
572 for (s = elf->ed_hdscn; s != 0; s = s->s_next) {
620 elf->ed_uflags |= ELF_F_DIRTY;
634 elf->ed_uflags |= ELF_F_DIRTY;
656 for (s = elf->ed_hdscn; s != 0; s = s->s_next) {
663 elf->ed_uflags |= ELF_F_DIRTY;
672 * by ld(1) to build up a full image of an elf file and then
678 elf->ed_uflags &= ~ELF_F_DIRTY;
679 elf->ed_wrimage = image;
680 elf->ed_wrimagesz = outsz;
684 if (_elf_outsync(elf->ed_fd, image, outsz,
685 ((elf->ed_myflags & EDF_IMALLOC) ? 0 : 1)) != 0) {
686 elf->ed_uflags &= ~ELF_F_DIRTY;
687 elf->ed_myflags &= ~EDF_IMALLOC;
691 elf->ed_uflags |= ELF_F_DIRTY;
702 * elf_update(elf, ELF_C_WRIMAGE)
703 * This will cause full image representing the elf file
704 * described by the elf pointer to be built in memory. If the
705 * elf pointer has a valid file descriptor associated with it
707 * storage. If the elf descriptor does not have a valid
721 _elfxx_update(Elf * elf, Elf_Cmd cmd)
725 Ehdr *eh = elf->ed_ehdr;
727 if (elf == 0)
730 ELFWLOCK(elf)
734 ELFUNLOCK(elf)
738 if ((elf->ed_myflags & EDF_WRITE) == 0) {
740 ELFUNLOCK(elf)
745 if ((elf->ed_myflags & EDF_WRITE) == 0) {
747 ELFUNLOCK(elf)
750 if (elf->ed_wrimage) {
751 if (elf->ed_myflags & EDF_WRALLOC) {
752 free(elf->ed_wrimage);
759 sz = elf->ed_wrimagesz;
760 elf->ed_wrimage = 0;
761 elf->ed_wrimagesz = 0;
762 ELFUNLOCK(elf);
765 sz = _elf_outsync(elf->ed_fd, elf->ed_wrimage,
766 elf->ed_wrimagesz,
767 (elf->ed_myflags & EDF_IMALLOC ? 0 : 1));
768 elf->ed_myflags &= ~EDF_IMALLOC;
769 elf->ed_wrimage = 0;
770 elf->ed_wrimagesz = 0;
771 ELFUNLOCK(elf);
781 ELFUNLOCK(elf)
787 ELFUNLOCK(elf)
800 ELFUNLOCK(elf)
808 if (elf->ed_uflags & ELF_F_LAYOUT) {
809 sz = _elf_upd_usr(elf);
812 sz = _elf_upd_lib(elf);
815 sz = wrt(elf, (Xword)sz, u, cmd);
818 ELFUNLOCK(elf)
822 ELFUNLOCK(elf)
836 _elfxx_swap_wrimage(Elf *elf)
849 ELFWLOCK(elf);
850 eh = elf->ed_ehdr;
860 ELFUNLOCK(elf);
875 src.d_buf = dst.d_buf = (Elf_Void *)elf->ed_phdr;
877 src.d_size = dst.d_size = elf->ed_phdrsz;
881 ELFUNLOCK(elf);
890 for (s = elf->ed_hdscn; s != 0; s = s->s_next) {
905 ELFUNLOCK(elf);
913 ELFUNLOCK(elf);
925 for (s = elf->ed_hdscn; s != 0; s = s->s_next) {
929 ELFUNLOCK(elf);
934 ELFUNLOCK(elf);
944 elf_update(Elf *elf, Elf_Cmd cmd)
946 if (elf == 0)
949 if (elf->ed_class == ELFCLASS32)
950 return (_elf32_update(elf, cmd));
951 else if (elf->ed_class == ELFCLASS64) {
952 return (_elf64_update(elf, cmd));
960 _elf_swap_wrimage(Elf *elf)
962 if (elf == 0)
965 if (elf->ed_class == ELFCLASS32)
966 return (_elf32_swap_wrimage(elf));
968 if (elf->ed_class == ELFCLASS64)
969 return (_elf64_swap_wrimage(elf));