Lines Matching full:elf
44 elf_newscn (elf) in elf_newscn() argument
45 Elf *elf; in elf_newscn()
50 if (elf == NULL)
53 /* We rely on the prefix of the `elf', `elf32', and `elf64' element
55 assert (offsetof (Elf, state.elf.scns_last)
56 == offsetof (Elf, state.elf32.scns_last));
57 assert (offsetof (Elf, state.elf.scns_last)
58 == offsetof (Elf, state.elf64.scns_last));
59 assert (offsetof (Elf, state.elf32.scns)
60 == offsetof (Elf, state.elf64.scns));
62 rwlock_wrlock (elf->lock);
65 if (elf->state.elf.scns_last->cnt < elf->state.elf.scns_last->max)
67 result = &elf->state.elf.scns_last->data[elf->state.elf.scns_last->cnt];
69 if (++elf->state.elf.scns_last->cnt == 1
70 && (elf->state.elf.scns_last
71 == (elf->class == ELFCLASS32
72 || (offsetof (Elf, state.elf32.scns)
73 == offsetof (Elf, state.elf64.scns))
74 ? &elf->state.elf32.scns : &elf->state.elf64.scns)))
79 assert (elf->state.elf.scns_last->cnt > 1);
88 assert (elf->state.elf.scnincr > 0);
92 likely (elf->state.elf.scnincr
99 + ((elf->state.elf.scnincr *= 2)
113 newp->max = elf->state.elf.scnincr;
117 = 1 + elf->state.elf.scns_last->data[elf->state.elf.scns_last->max - 1].index;
120 elf->state.elf.scns_last = elf->state.elf.scns_last->next = newp;
124 if (elf->class == ELFCLASS32)
143 result->elf = elf;
145 result->list = elf->state.elf.scns_last;
160 rwlock_unlock (elf->lock);