Lines Matching refs:section
130 struct section *find_section_by_name(const struct elf *elf, const char *name)
132 struct section *sec;
141 static struct section *find_section_by_index(struct elf *elf,
144 struct section *sec;
164 struct symbol *find_symbol_by_offset(struct section *sec, unsigned long offset)
178 struct symbol *find_func_by_offset(struct section *sec, unsigned long offset)
192 struct symbol *find_symbol_containing(const struct section *sec, unsigned long offset)
206 struct symbol *find_func_containing(struct section *sec, unsigned long offset)
231 struct reloc *find_reloc_by_dest_range(const struct elf *elf, struct section *sec,
260 struct reloc *find_reloc_by_dest(const struct elf *elf, struct section *sec, unsigned long offset)
268 struct section *sec;
337 WARN("section entry mismatch");
377 struct section *symtab, *symtab_shndx, *sec;
430 WARN("couldn't find section for symbol %s",
508 static struct section *elf_create_reloc_section(struct elf *elf,
509 struct section *base,
512 int elf_add_reloc(struct elf *elf, struct section *sec, unsigned long offset,
542 * Ensure that any reloc section containing references to @sym is marked
548 struct section *sec;
573 static int elf_update_symbol(struct elf *elf, struct section *symtab,
574 struct section *symtab_shndx, struct symbol *sym)
670 /* setup extended section index magic and write the symbol */
692 elf_create_section_symbol(struct elf *elf, struct section *sec)
694 struct section *symtab, *symtab_shndx;
760 int elf_add_reloc_to_insn(struct elf *elf, struct section *sec,
762 struct section *insn_sec, unsigned long insn_off)
769 * Due to how weak functions work, we must use section based
784 static int read_rel_reloc(struct section *sec, int i, struct reloc *reloc, unsigned int *symndx)
797 static int read_rela_reloc(struct section *sec, int i, struct reloc *reloc, unsigned int *symndx)
812 struct section *sec;
825 WARN("can't find base section for reloc section %s",
941 static int elf_add_string(struct elf *elf, struct section *strtab, char *str)
950 WARN("can't find .strtab section");
978 struct section *elf_create_section(struct elf *elf, const char *name,
981 struct section *sec, *shstrtab;
1040 /* Add section name to .shstrtab (or .strtab for Clang) */
1045 WARN("can't find .shstrtab or .strtab section");
1061 static struct section *elf_create_rel_reloc_section(struct elf *elf, struct section *base)
1064 struct section *sec;
1091 static struct section *elf_create_rela_reloc_section(struct elf *elf, struct section *base)
1094 struct section *sec;
1121 static struct section *elf_create_reloc_section(struct elf *elf,
1122 struct section *base,
1132 static int elf_rebuild_rel_reloc_section(struct section *sec, int nr)
1161 static int elf_rebuild_rela_reloc_section(struct section *sec, int nr)
1191 static int elf_rebuild_reloc_section(struct elf *elf, struct section *sec)
1207 int elf_write_insn(struct elf *elf, struct section *sec,
1214 WARN("write to unexpected data for section: %s", sec->name);
1228 struct section *sec = reloc->sec;
1256 struct section *sec;
1259 /* Update changed relocation sections and section headers: */
1283 /* Make sure the new section header entries get updated properly. */
1299 struct section *sec, *tmpsec;