Lines Matching defs:section
24 struct section {
26 struct section *link;
32 static struct section *secs;
118 static struct section *sec_lookup(const char *secname)
173 die("Bad section header entry\n");
183 secs = calloc(ehdr.e_shnum, sizeof(struct section));
185 die("Unable to allocate %d section headers\n", ehdr.e_shnum);
191 struct section *sec = &secs[i];
195 die("Cannot read ELF section headers %d/%d: %s\n",
208 struct section *sec = &secs[i];
233 struct section *sec = &secs[i];
258 struct section *sec = sec_lookup(".text");
261 die("Could not find .text section\n");
267 struct section *sec = &secs[i];
300 struct section *sec = &secs[i];
310 die("Cannot read ELF section headers %d/%d: %s\n",
313 /* Set relocation section size to 0, effectively removing it.
324 die("Cannot write ELF section headers %d/%d: %s\n",
354 static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
363 struct section *sec_applies, *sec_symtab;
365 struct section *sec = &secs[i];
387 static int do_reloc(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
465 struct section *sec_reloc;
469 die("Could not find relocation section\n");
481 printf(".section \".data.reloc\",\"a\"\n");
490 /* Seek to offset of the relocation section.
521 * different orders we use the section names in the output.
523 static int do_reloc_info(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
538 "reloc section",
542 "symbol section");