Lines Matching refs:head
86 add_section(struct elf_section **head, struct elf_section *s) in add_section() argument
89 q = head; in add_section()
90 p = *head; in add_section()
105 read_sections(int fd, Elf_Ehdr *ehdr, char *shstrtab, struct elf_section **head) in read_sections() argument
110 *head = NULL; in read_sections()
132 add_section(head, s); in read_sections()
140 struct elf_section *head, *cur, *prev; in get_symtab() local
142 head = NULL; in get_symtab()
147 if (head == NULL) in get_symtab()
148 head = cur; in get_symtab()
163 *stab = head; in get_symtab()
168 free_sections(struct elf_section *head) in free_sections() argument
171 while (head) { in free_sections()
172 struct elf_section *p = head; in free_sections()
173 head = head->next; in free_sections()
199 read_string_table(int fd, struct elf_section *head, int *strtablen) in read_string_table() argument
203 while (head) { in read_string_table()
204 if (strcmp(head->name, ".strtab") == 0 && in read_string_table()
205 head->type == SHT_STRTAB) { in read_string_table()
206 string_table = malloc(head->size); in read_string_table()
209 (u_long)head->size); in read_string_table()
210 if (lseek(fd, head->offset, SEEK_SET) < 0) in read_string_table()
212 if ((size_t)read(fd, string_table, head->size) in read_string_table()
213 != head->size) in read_string_table()
215 *strtablen = head->size; in read_string_table()
218 head = head->next; in read_string_table()
258 struct elf_section *head, *s, *stab; in elf_mod_sizes() local
263 read_sections(fd, &ehdr, shstrtab, &head); in elf_mod_sizes()
265 for (s = head; s; s = s->next) { in elf_mod_sizes()
295 strtabl = read_string_table(fd, head, strtablen); in elf_mod_sizes()
300 get_symtab(&head); in elf_mod_sizes()
301 stab = head; in elf_mod_sizes()
308 free_sections(head); in elf_mod_sizes()
356 struct elf_section *head, *s; in elf_mod_load() local
364 read_sections(fd, &ehdr, shstrtab, &head); in elf_mod_load()
366 for (s = head; s; s = s->next) { in elf_mod_load()
408 free_sections(head); in elf_mod_load()
420 struct elf_section *head, *s; in elf_mod_symload() local
432 read_sections(modfd, &ehdr, shstrtab, &head); in elf_mod_symload()
434 for (s = head; s; s = s->next) { in elf_mod_symload()
458 for (s = head; s; s = s->next) { in elf_mod_symload()
484 free_sections(head); in elf_mod_symload()