Lines Matching full:symbol

88 static inline unsigned long __sym_start(struct symbol *s)  in __sym_start()
93 static inline unsigned long __sym_last(struct symbol *s) in __sym_last()
98 INTERVAL_TREE_DEFINE(struct symbol, node, unsigned long, __subtree_last,
107 const struct symbol *sym;
111 * Find !section symbol where @offset is after it.
115 const struct symbol *s = rb_entry(node, struct symbol, node); in symbol_hole_by_offset()
155 static struct symbol *find_symbol_by_index(struct elf *elf, unsigned int idx) in find_symbol_by_index()
157 struct symbol *sym; in find_symbol_by_index()
159 elf_hash_for_each_possible(symbol, sym, hash, idx) { in find_symbol_by_index()
167 struct symbol *find_symbol_by_offset(struct section *sec, unsigned long offset) in find_symbol_by_offset()
170 struct symbol *iter; in find_symbol_by_offset()
180 struct symbol *find_func_by_offset(struct section *sec, unsigned long offset) in find_func_by_offset()
183 struct symbol *iter; in find_func_by_offset()
193 struct symbol *find_symbol_containing(const struct section *sec, unsigned long offset) in find_symbol_containing()
196 struct symbol *iter; in find_symbol_containing()
216 struct symbol *s; in find_symbol_hole_containing()
219 * Find the rightmost symbol for which @offset is after it. in find_symbol_hole_containing()
223 /* found a symbol that contains @offset */ in find_symbol_hole_containing()
227 /* didn't find a symbol for which @offset is after it */ in find_symbol_hole_containing()
231 /* @offset >= sym->offset + sym->len, find symbol after it */ in find_symbol_hole_containing()
236 /* hole until start of next symbol */ in find_symbol_hole_containing()
237 s = rb_entry(n, struct symbol, node); in find_symbol_hole_containing()
241 struct symbol *find_func_containing(struct section *sec, unsigned long offset) in find_func_containing()
244 struct symbol *iter; in find_func_containing()
254 struct symbol *find_symbol_by_name(const struct elf *elf, const char *name) in find_symbol_by_name()
256 struct symbol *sym; in find_symbol_by_name()
392 static void elf_add_symbol(struct elf *elf, struct symbol *sym) in elf_add_symbol()
396 struct symbol *iter; in elf_add_symbol()
418 entry = &rb_entry(pnode, struct symbol, node)->list; in elf_add_symbol()
422 elf_hash_add(symbol, &sym->hash, sym->idx); in elf_add_symbol()
436 struct symbol *sym, *pfunc; in read_symbols()
451 * A missing symbol table is actually possible if it's an empty in read_symbols()
453 * least allocate the symbol hash tables so we can do symbol in read_symbols()
459 if (!elf_alloc_hash(symbol, symbols_nr) || in read_symbols()
494 WARN("couldn't find section for symbol %s", in read_symbols()
577 static int elf_update_sym_relocs(struct elf *elf, struct symbol *sym) in elf_update_sym_relocs()
589 * index value, *NOT* the symbol index. As such, iterate the data blocks and
596 struct section *symtab_shndx, struct symbol *sym) in elf_update_symbol()
632 * Over-allocate to avoid O(n^2) symbol creation in elf_update_symbol()
640 /* we don't do holes in symbol tables */ in elf_update_symbol()
704 /* setup extended section index magic and write the symbol */ in elf_update_symbol()
725 static struct symbol *
726 __elf_create_symbol(struct elf *elf, struct symbol *sym) in __elf_create_symbol()
730 struct symbol *old; in __elf_create_symbol()
746 * Move the first global symbol, as per sh_info, into a new, higher in __elf_create_symbol()
747 * symbol index. This fees up a spot for a new local symbol. in __elf_create_symbol()
753 elf_hash_del(symbol, &old->hash, old->idx); in __elf_create_symbol()
754 elf_hash_add(symbol, &old->hash, new_idx); in __elf_create_symbol()
769 * Either way, we will add a LOCAL symbol. in __elf_create_symbol()
791 static struct symbol *
794 struct symbol *sym = calloc(1, sizeof(*sym)); in elf_create_section_symbol()
819 struct symbol *
820 elf_create_prefix_symbol(struct elf *elf, struct symbol *orig, long size) in elf_create_prefix_symbol()
822 struct symbol *sym = calloc(1, sizeof(*sym)); in elf_create_prefix_symbol()
850 unsigned long offset, struct symbol *sym, in elf_init_reloc()
890 struct symbol *sym = insn_sec->sym; in elf_init_reloc_text_sym()
894 WARN("bad call to %s() for data symbol %s", in elf_init_reloc_text_sym()
902 * relocations. Symbol based relocations would result in the in elf_init_reloc_text_sym()
920 struct symbol *sym, in elf_init_reloc_data_sym()
924 WARN("bad call to %s() for text symbol %s", in elf_init_reloc_data_sym()
939 struct symbol *sym; in read_relocs()
971 WARN("can't find reloc entry symbol %d for %s", in read_relocs()