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()
228 * @offset >= sym->offset + sym->len, find symbol after it. in find_symbol_hole_containing()
230 * If there is no symbol in the section, the first node will be NULL, in find_symbol_hole_containing()
241 /* hole until start of next symbol */ in find_symbol_hole_containing()
242 s = rb_entry(n, struct symbol, node); in find_symbol_hole_containing()
246 struct symbol *find_func_containing(struct section *sec, unsigned long offset) in find_func_containing()
249 struct symbol *iter; in find_func_containing()
259 struct symbol *find_symbol_by_name(const struct elf *elf, const char *name) in find_symbol_by_name()
261 struct symbol *sym; in find_symbol_by_name()
397 static void elf_add_symbol(struct elf *elf, struct symbol *sym) in elf_add_symbol()
401 struct symbol *iter; in elf_add_symbol()
423 entry = &rb_entry(pnode, struct symbol, node)->list; in elf_add_symbol()
427 elf_hash_add(symbol, &sym->hash, sym->idx); in elf_add_symbol()
441 struct symbol *sym, *pfunc; in read_symbols()
456 * A missing symbol table is actually possible if it's an empty in read_symbols()
458 * least allocate the symbol hash tables so we can do symbol in read_symbols()
464 if (!elf_alloc_hash(symbol, symbols_nr) || in read_symbols()
499 WARN("couldn't find section for symbol %s", in read_symbols()
582 static int elf_update_sym_relocs(struct elf *elf, struct symbol *sym) in elf_update_sym_relocs()
594 * index value, *NOT* the symbol index. As such, iterate the data blocks and
601 struct section *symtab_shndx, struct symbol *sym) in elf_update_symbol()
637 * Over-allocate to avoid O(n^2) symbol creation in elf_update_symbol()
645 /* we don't do holes in symbol tables */ in elf_update_symbol()
709 /* setup extended section index magic and write the symbol */ in elf_update_symbol()
730 static struct symbol *
731 __elf_create_symbol(struct elf *elf, struct symbol *sym) in __elf_create_symbol()
735 struct symbol *old; in __elf_create_symbol()
751 * Move the first global symbol, as per sh_info, into a new, higher in __elf_create_symbol()
752 * symbol index. This fees up a spot for a new local symbol. in __elf_create_symbol()
758 elf_hash_del(symbol, &old->hash, old->idx); in __elf_create_symbol()
759 elf_hash_add(symbol, &old->hash, new_idx); in __elf_create_symbol()
774 * Either way, we will add a LOCAL symbol. in __elf_create_symbol()
796 static struct symbol *
799 struct symbol *sym = calloc(1, sizeof(*sym)); in elf_create_section_symbol()
824 struct symbol *
825 elf_create_prefix_symbol(struct elf *elf, struct symbol *orig, long size) in elf_create_prefix_symbol()
827 struct symbol *sym = calloc(1, sizeof(*sym)); in elf_create_prefix_symbol()
855 unsigned long offset, struct symbol *sym, in elf_init_reloc()
895 struct symbol *sym = insn_sec->sym; in elf_init_reloc_text_sym()
899 WARN("bad call to %s() for data symbol %s", in elf_init_reloc_text_sym()
907 * relocations. Symbol based relocations would result in the in elf_init_reloc_text_sym()
925 struct symbol *sym, in elf_init_reloc_data_sym()
929 WARN("bad call to %s() for text symbol %s", in elf_init_reloc_data_sym()
944 struct symbol *sym; in read_relocs()
976 WARN("can't find reloc entry symbol %d for %s", in read_relocs()