• Home
  • Raw
  • Download

Lines Matching refs:sym

366 	Elf_Sym  *sym;  in parse_elf()  local
456 for (sym = info->symtab_start; sym < info->symtab_stop; sym++) { in parse_elf()
457 sym->st_shndx = TO_NATIVE(sym->st_shndx); in parse_elf()
458 sym->st_name = TO_NATIVE(sym->st_name); in parse_elf()
459 sym->st_value = TO_NATIVE(sym->st_value); in parse_elf()
460 sym->st_size = TO_NATIVE(sym->st_size); in parse_elf()
493 Elf_Sym *sym, const char *symname) in handle_modversions() argument
496 enum export export = export_from_sec(info, sym->st_shndx); in handle_modversions()
498 switch (sym->st_shndx) { in handle_modversions()
505 crc = (unsigned int) sym->st_value; in handle_modversions()
512 if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL && in handle_modversions()
513 ELF_ST_BIND(sym->st_info) != STB_WEAK) in handle_modversions()
526 if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER) in handle_modversions()
542 ELF_ST_BIND(sym->st_info) == STB_WEAK, in handle_modversions()
630 static const char *sym_name(struct elf_info *elf, Elf_Sym *sym) in sym_name() argument
632 if (sym) in sym_name()
633 return elf->strtab + sym->st_name; in sym_name()
657 static int number_prefix(const char *sym) in number_prefix() argument
659 if (*sym++ == '\0') in number_prefix()
661 if (*sym != '.') in number_prefix()
664 char c = *sym++; in number_prefix()
667 } while (*sym); in number_prefix()
680 int match(const char *sym, const char * const pat[]) in match() argument
689 if (strrcmp(sym, p + 1) == 0) in match()
694 if (strncmp(sym, p, strlen(p) - 1) == 0) in match()
699 if (strncmp(sym, p, strlen(p) - 1) == 0) { in match()
700 if (number_prefix(sym + strlen(p) - 1)) in match()
706 if (strcmp(p, sym) == 0) in match()
992 Elf_Sym *sym; in find_elf_symbol() local
999 for (sym = elf->symtab_start; sym < elf->symtab_stop; sym++) { in find_elf_symbol()
1000 if (sym->st_shndx != relsym->st_shndx) in find_elf_symbol()
1002 if (ELF_ST_TYPE(sym->st_info) == STT_SECTION) in find_elf_symbol()
1004 if (sym->st_value == addr) in find_elf_symbol()
1005 return sym; in find_elf_symbol()
1007 d = sym->st_value - addr; in find_elf_symbol()
1009 d = addr - sym->st_value; in find_elf_symbol()
1012 near = sym; in find_elf_symbol()
1037 static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym) in is_valid_name() argument
1039 const char *name = elf->strtab + sym->st_name; in is_valid_name()
1055 Elf_Sym *sym; in find_elf_symbol2() local
1059 for (sym = elf->symtab_start; sym < elf->symtab_stop; sym++) { in find_elf_symbol2()
1062 if (sym->st_shndx >= SHN_LORESERVE) in find_elf_symbol2()
1064 symsec = sec_name(elf, sym->st_shndx); in find_elf_symbol2()
1067 if (!is_valid_name(elf, sym)) in find_elf_symbol2()
1069 if (sym->st_value <= addr) { in find_elf_symbol2()
1070 if ((addr - sym->st_value) < distance) { in find_elf_symbol2()
1071 distance = addr - sym->st_value; in find_elf_symbol2()
1072 near = sym; in find_elf_symbol2()
1073 } else if ((addr - sym->st_value) == distance) { in find_elf_symbol2()
1074 near = sym; in find_elf_symbol2()
1115 static int is_function(Elf_Sym *sym) in is_function() argument
1117 if (sym) in is_function()
1118 return ELF_ST_TYPE(sym->st_info) == STT_FUNC; in is_function()
1256 Elf_Rela *r, Elf_Sym *sym, const char *fromsec) in check_section_mismatch() argument
1261 tosec = sec_name(elf, sym->st_shndx); in check_section_mismatch()
1271 to = find_elf_symbol(elf, r->r_addend, sym); in check_section_mismatch()
1361 Elf_Sym *sym; in section_rela() local
1394 sym = elf->symtab_start + r_sym; in section_rela()
1396 if (sym->st_shndx >= SHN_LORESERVE) in section_rela()
1398 check_section_mismatch(modname, elf, &r, sym, fromsec); in section_rela()
1405 Elf_Sym *sym; in section_rel() local
1452 sym = elf->symtab_start + r_sym; in section_rel()
1454 if (sym->st_shndx >= SHN_LORESERVE) in section_rel()
1456 check_section_mismatch(modname, elf, &r, sym, fromsec); in section_rel()
1493 const Elf_Sym *sym, *first_sym, *last_sym; in get_markers() local
1507 for (sym = info->symtab_start; sym < info->symtab_stop; sym++) in get_markers()
1508 if (ELF_ST_TYPE(sym->st_info) == STT_OBJECT && in get_markers()
1509 sym->st_shndx == info->markers_strings_sec && in get_markers()
1510 !strncmp(info->strtab + sym->st_name, in get_markers()
1513 first_sym = sym; in get_markers()
1514 last_sym = sym; in get_markers()
1531 for (sym = first_sym; sym <= last_sym; sym++) in get_markers()
1532 if (ELF_ST_TYPE(sym->st_info) == STT_OBJECT && in get_markers()
1533 sym->st_shndx == info->markers_strings_sec && in get_markers()
1534 !strncmp(info->strtab + sym->st_name, in get_markers()
1536 const char *name = strings + sym->st_value; in get_markers()
1552 Elf_Sym *sym; in read_symbols() local
1582 for (sym = info.symtab_start; sym < info.symtab_stop; sym++) { in read_symbols()
1583 symname = info.strtab + sym->st_name; in read_symbols()
1585 handle_modversions(mod, &info, sym, symname); in read_symbols()
1586 handle_moddevtable(mod, &info, sym, symname); in read_symbols()
1927 static int dump_sym(struct symbol *sym) in dump_sym() argument
1931 if (sym->vmlinux || sym->kernel) in dump_sym()