Lines Matching full:section
86 struct section *find_section_by_name(const struct elf *elf, const char *name) in find_section_by_name()
88 struct section *sec; in find_section_by_name()
98 static struct section *find_section_by_index(struct elf *elf, in find_section_by_index()
101 struct section *sec; in find_section_by_index()
103 elf_hash_for_each_possible(section, sec, hash, idx) { in find_section_by_index()
123 struct symbol *find_symbol_by_offset(struct section *sec, unsigned long offset) in find_symbol_by_offset()
137 struct symbol *find_func_by_offset(struct section *sec, unsigned long offset) in find_func_by_offset()
151 struct symbol *find_symbol_containing(const struct section *sec, unsigned long offset) in find_symbol_containing()
165 struct symbol *find_func_containing(struct section *sec, unsigned long offset) in find_func_containing()
191 struct reloc *find_reloc_by_dest_range(const struct elf *elf, struct section *sec, in find_reloc_by_dest_range()
220 struct reloc *find_reloc_by_dest(const struct elf *elf, struct section *sec, unsigned long offset) in find_reloc_by_dest()
228 struct section *sec; in read_sections()
242 if (!elf_alloc_hash(section, sections_nr) || in read_sections()
294 elf_hash_add(section, &sec->hash, sec->idx); in read_sections()
305 WARN("section entry mismatch"); in read_sections()
343 struct section *symtab, *symtab_shndx, *sec; in read_symbols()
403 WARN("couldn't find section for symbol %s", in read_symbols()
483 static struct section *elf_create_reloc_section(struct elf *elf,
484 struct section *base,
487 int elf_add_reloc(struct elf *elf, struct section *sec, unsigned long offset, in elf_add_reloc()
517 int elf_add_reloc_to_insn(struct elf *elf, struct section *sec, in elf_add_reloc_to_insn()
519 struct section *insn_sec, unsigned long insn_off) in elf_add_reloc_to_insn()
530 * The Clang assembler strips section symbols, so we have to in elf_add_reloc_to_insn()
553 static int read_rel_reloc(struct section *sec, int i, struct reloc *reloc, unsigned int *symndx) in read_rel_reloc()
566 static int read_rela_reloc(struct section *sec, int i, struct reloc *reloc, unsigned int *symndx) in read_rela_reloc()
581 struct section *sec; in read_relocs()
597 WARN("can't find base section for reloc section %s", in read_relocs()
708 static int elf_add_string(struct elf *elf, struct section *strtab, char *str) in elf_add_string()
717 WARN("can't find .strtab section"); in elf_add_string()
746 struct section *symtab, *symtab_shndx; in elf_create_undef_symbol()
828 struct section *elf_create_section(struct elf *elf, const char *name, in elf_create_section()
831 struct section *sec, *shstrtab; in elf_create_section()
889 /* Add section name to .shstrtab (or .strtab for Clang) */ in elf_create_section()
894 WARN("can't find .shstrtab or .strtab section"); in elf_create_section()
902 elf_hash_add(section, &sec->hash, sec->idx); in elf_create_section()
910 static struct section *elf_create_rel_reloc_section(struct elf *elf, struct section *base) in elf_create_rel_reloc_section()
913 struct section *sec; in elf_create_rel_reloc_section()
940 static struct section *elf_create_rela_reloc_section(struct elf *elf, struct section *base) in elf_create_rela_reloc_section()
943 struct section *sec; in elf_create_rela_reloc_section()
970 static struct section *elf_create_reloc_section(struct elf *elf, in elf_create_reloc_section()
971 struct section *base, in elf_create_reloc_section()
981 static int elf_rebuild_rel_reloc_section(struct section *sec) in elf_rebuild_rel_reloc_section()
1012 static int elf_rebuild_rela_reloc_section(struct section *sec) in elf_rebuild_rela_reloc_section()
1044 static int elf_rebuild_reloc_section(struct elf *elf, struct section *sec) in elf_rebuild_reloc_section()
1053 int elf_write_insn(struct elf *elf, struct section *sec, in elf_write_insn()
1060 WARN("write to unexpected data for section: %s", sec->name); in elf_write_insn()
1074 struct section *sec = reloc->sec; in elf_write_reloc()
1102 struct section *sec; in elf_write()
1105 /* Update changed relocation sections and section headers: */ in elf_write()
1129 /* Make sure the new section header entries get updated properly. */ in elf_write()
1145 struct section *sec, *tmpsec; in elf_close()