Lines Matching defs:section
24 struct section {
26 struct section *link;
32 static struct section *secs;
108 static struct section *sec_lookup(const char *secname)
254 die("Bad section header entry\n");
265 secs = calloc(ehdr.e_shnum, sizeof(struct section));
267 die("Unable to allocate %d section headers\n", ehdr.e_shnum);
273 struct section *sec = &secs[i];
277 die("Cannot read ELF section headers %d/%d: %s\n",
299 struct section *sec = &secs[i];
324 struct section *sec = &secs[i];
358 struct section *sec = sec_lookup(".text");
361 die("Could not find .text section\n");
367 struct section *sec = &secs[i];
413 struct section *sec = &secs[i];
423 die("Cannot read ELF section headers %d/%d: %s\n",
426 /* Set relocation section size to 0, effectively removing it.
437 die("Cannot write ELF section headers %d/%d: %s\n",
467 static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
476 struct section *sec_applies, *sec_symtab;
478 struct section *sec = &secs[i];
500 static int do_reloc(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
578 struct section *sec_reloc;
582 die("Could not find relocation section\n");
594 printf(".section \".data.reloc\",\"a\"\n");
603 /* Seek to offset of the relocation section.
634 * different orders we use the section names in the output.
636 static int do_reloc_info(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
651 "reloc section",
655 "symbol section");