Lines Matching defs:elf
38 elf_newscn(Elf * elf)
42 if (elf == 0)
45 ELFWLOCK(elf)
50 if ((elf->ed_hdscn == 0) && (_elf_cook(elf) != OK_YES)) {
51 ELFUNLOCK(elf)
54 if (elf->ed_ehdr == 0) {
56 ELFUNLOCK(elf)
60 if (elf->ed_class == ELFCLASS32) {
63 if (elf->ed_hdscn == 0) {
65 ELFUNLOCK(elf)
69 s->sb_scn.s_elf = elf;
70 elf->ed_hdscn = elf->ed_tlscn = &s->sb_scn;
74 ELFUNLOCK(elf)
78 tl = elf->ed_tlscn;
79 s->sb_scn.s_elf = elf;
81 elf->ed_tlscn = tl->s_next = &s->sb_scn;
82 ((Elf32_Ehdr *)elf->ed_ehdr)->e_shnum
88 ELFUNLOCK(elf)
90 } else if (elf->ed_class == ELFCLASS64) {
93 if (elf->ed_hdscn == 0) {
95 ELFUNLOCK(elf)
99 s->sb_scn.s_elf = elf;
100 elf->ed_hdscn = elf->ed_tlscn = &s->sb_scn;
104 ELFUNLOCK(elf)
108 tl = elf->ed_tlscn;
109 s->sb_scn.s_elf = elf;
111 elf->ed_tlscn = tl->s_next = &s->sb_scn;
112 ((Elf64_Ehdr *)elf->ed_ehdr)->e_shnum
118 ELFUNLOCK(elf)
122 ELFUNLOCK(elf)