Home | History | Annotate | Download | only in libelf

Lines Matching refs:elf

32 elf_newscn (elf)
33 Elf *elf;
38 if (elf == NULL)
41 /* We rely on the prefix of the `elf', `elf32', and `elf64' element
43 assert (offsetof (Elf, state.elf.scns_last)
44 == offsetof (Elf, state.elf32.scns_last));
45 assert (offsetof (Elf, state.elf.scns_last)
46 == offsetof (Elf, state.elf64.scns_last));
47 assert (offsetof (Elf, state.elf32.scns)
48 == offsetof (Elf, state.elf64.scns));
50 rwlock_wrlock (elf->lock);
53 if (elf->state.elf.scns_last->cnt < elf->state.elf.scns_last->max)
55 result = &elf->state.elf.scns_last->data[elf->state.elf.scns_last->cnt];
57 if (++elf->state.elf.scns_last->cnt == 1
58 && (elf->state.elf.scns_last
59 == (elf->class == ELFCLASS32
60 || (offsetof (Elf, state.elf32.scns)
61 == offsetof (Elf, state.elf64.scns))
62 ? &elf->state.elf32.scns : &elf->state.elf64.scns)))
67 assert (elf->state.elf.scns_last->cnt > 1);
76 assert (elf->state.elf.scnincr > 0);
79 + ((elf->state.elf.scnincr *= 2)
93 newp->max = elf->state.elf.scnincr;
97 = 1 + elf->state.elf.scns_last->data[elf->state.elf.scns_last->max - 1].index;
100 elf->state.elf.scns_last = elf->state.elf.scns_last->next = newp;
104 if (elf->class == ELFCLASS32)
123 result->elf = elf;
125 result->list = elf->state.elf.scns_last;
140 rwlock_unlock (elf->lock);