Lines Matching refs:sym
20 static int sym_index(Elf_Sym *sym);
271 static const char *sym_name(const char *sym_strtab, Elf_Sym *sym) in sym_name() argument
275 if (sym->st_name) { in sym_name()
276 name = sym_strtab + sym->st_name; in sym_name()
279 name = sec_name(sym_index(sym)); in sym_name()
292 Elf_Sym *sym; in sym_lookup() local
301 for (sym = symtab; --nsyms >= 0; sym++) { in sym_lookup()
302 if (!sym->st_name) in sym_lookup()
304 if (strcmp(symname, strtab + sym->st_name) == 0) in sym_lookup()
305 return sym; in sym_lookup()
349 static int sym_index(Elf_Sym *sym) in sym_index() argument
356 if (sym->st_shndx != SHN_XINDEX) in sym_index()
357 return sym->st_shndx; in sym_index()
360 offset = (unsigned long)sym - (unsigned long)symtab; in sym_index()
361 index = offset / sizeof(*sym); in sym_index()
541 Elf_Sym *sym = &sec->symtab[j]; in read_symtabs() local
543 sym->st_name = elf_word_to_cpu(sym->st_name); in read_symtabs()
544 sym->st_value = elf_addr_to_cpu(sym->st_value); in read_symtabs()
545 sym->st_size = elf_xword_to_cpu(sym->st_size); in read_symtabs()
546 sym->st_shndx = elf_half_to_cpu(sym->st_shndx); in read_symtabs()
614 Elf_Sym *sym; in print_absolute_symbols() local
616 sym = &sec->symtab[j]; in print_absolute_symbols()
617 name = sym_name(sym_strtab, sym); in print_absolute_symbols()
618 if (sym->st_shndx != SHN_ABS) { in print_absolute_symbols()
622 j, sym->st_value, sym->st_size, in print_absolute_symbols()
623 sym_type(ELF_ST_TYPE(sym->st_info)), in print_absolute_symbols()
624 sym_bind(ELF_ST_BIND(sym->st_info)), in print_absolute_symbols()
625 sym_visibility(ELF_ST_VISIBILITY(sym->st_other)), in print_absolute_symbols()
660 Elf_Sym *sym; in print_absolute_relocs() local
663 sym = &sh_symtab[ELF_R_SYM(rel->r_info)]; in print_absolute_relocs()
664 name = sym_name(sym_strtab, sym); in print_absolute_relocs()
665 if (sym->st_shndx != SHN_ABS) { in print_absolute_relocs()
697 sym->st_value, in print_absolute_relocs()
722 Elf_Sym *sym, const char *symname)) in walk_relocs() argument
745 Elf_Sym *sym = &sh_symtab[ELF_R_SYM(rel->r_info)]; in walk_relocs() local
746 const char *symname = sym_name(sym_strtab, sym); in walk_relocs()
748 process(sec, rel, sym, symname); in walk_relocs()
783 ElfW(Sym) *sym; in percpu_init()
790 sym = sym_lookup("__per_cpu_load"); in percpu_init()
791 if (!sym) in percpu_init()
795 per_cpu_load_addr = sym->st_value; in percpu_init()
817 static int is_percpu_sym(ElfW(Sym) *sym, const char *symname) in is_percpu_sym() argument
819 int shndx = sym_index(sym); in is_percpu_sym()
828 static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym, in do_reloc64() argument
833 int shn_abs = (sym->st_shndx == SHN_ABS) && !is_reloc(S_REL, symname); in do_reloc64()
835 if (sym->st_shndx == SHN_UNDEF) in do_reloc64()
857 if (is_percpu_sym(sym, symname)) in do_reloc64()
865 if (is_percpu_sym(sym, symname)) in do_reloc64()
876 if (is_percpu_sym(sym, symname)) in do_reloc64()
918 static int do_reloc32(struct section *sec, Elf_Rel *rel, Elf_Sym *sym, in do_reloc32() argument
922 int shn_abs = (sym->st_shndx == SHN_ABS) && !is_reloc(S_REL, symname); in do_reloc32()
963 static int do_reloc_real(struct section *sec, Elf_Rel *rel, Elf_Sym *sym, in do_reloc_real() argument
967 int shn_abs = (sym->st_shndx == SHN_ABS) && !is_reloc(S_REL, symname); in do_reloc_real()
1067 int (*do_reloc)(struct section *sec, Elf_Rel *rel, Elf_Sym *sym, in emit_relocs()
1147 static int do_reloc_info(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym, in do_reloc_info() argument
1154 sec_name(sym_index(sym))); in do_reloc_info()