Lines Matching defs:elf
64 elf_newehdr(Elf * elf)
68 if (elf == 0)
75 ELFWLOCK(elf)
76 if (elf->ed_myflags & EDF_READ) {
77 ELFUNLOCK(elf)
78 if ((eh = (Ehdr *)getehdr(elf)) != 0) {
79 ELFWLOCK(elf)
80 elf->ed_ehflags |= ELF_F_DIRTY;
81 ELFUNLOCK(elf)
90 if (elf->ed_class == ELFCLASSNONE)
91 elf->ed_class = ELFCLASS;
92 else if (elf->ed_class != ELFCLASS) {
94 ELFUNLOCK(elf)
97 ELFUNLOCK(elf);
98 if ((eh = (Ehdr *)getehdr(elf)) != 0) { /* this cooks if necessary */
99 ELFWLOCK(elf)
100 elf->ed_ehflags |= ELF_F_DIRTY;
101 ELFUNLOCK(elf)
104 ELFWLOCK(elf)
108 ELFUNLOCK(elf)
112 elf->ed_myflags |= EDF_EHALLOC;
113 elf->ed_ehflags |= ELF_F_DIRTY;
114 elf->ed_ehdr = eh;
115 ELFUNLOCK(elf)