Home | History | Annotate | Download | only in libelf

Lines Matching refs:Elf

65 elf_newscn (elf)
66 Elf *elf;
71 if (elf == NULL)
74 /* We rely on the prefix of the `elf', `elf32', and `elf64' element
76 assert (offsetof (Elf, state.elf.scns_last)
77 == offsetof (Elf, state.elf32.scns_last));
78 assert (offsetof (Elf, state.elf.scns_last)
79 == offsetof (Elf, state.elf64.scns_last));
80 assert (offsetof (Elf, state.elf32.scns)
81 == offsetof (Elf, state.elf64.scns));
83 rwlock_wrlock (elf->lock);
86 if (elf->state.elf.scns_last->cnt < elf->state.elf.scns_last->max)
88 result = &elf->state.elf.scns_last->data[elf->state.elf.scns_last->cnt];
90 if (++elf->state.elf.scns_last->cnt == 1
91 && (elf->state.elf.scns_last
92 == (elf->class == ELFCLASS32
93 || (offsetof (Elf, state.elf32.scns)
94 == offsetof (Elf, state.elf64.scns))
95 ? &elf->state.elf32.scns : &elf->state.elf64.scns)))
100 assert (elf->state.elf.scns_last->cnt > 1);
109 assert (elf->state.elf.scnincr > 0);
112 + ((elf->state.elf.scnincr *= 2)
126 newp->max = elf->state.elf.scnincr;
130 = 1 + elf->state.elf.scns_last->data[elf->state.elf.scns_last->max - 1].index;
133 elf->state.elf.scns_last = elf->state.elf.scns_last->next = newp;
137 if (elf->class == ELFCLASS32)
156 result->elf = elf;
158 result->list = elf->state.elf.scns_last;
173 rwlock_unlock (elf->lock);