Home
last modified time | relevance | path

Searched refs:elf (Results 1 – 5 of 5) sorted by relevance

/scripts/mod/
Dsymsearch.c50 static unsigned int symbol_count(struct elf_info *elf) in symbol_count() argument
54 for (Elf_Sym *sym = elf->symtab_start; sym < elf->symtab_stop; sym++) { in symbol_count()
55 if (is_valid_name(elf, sym)) in symbol_count()
68 static void symsearch_populate(struct elf_info *elf, in symsearch_populate() argument
72 bool is_arm = (elf->hdr->e_machine == EM_ARM); in symsearch_populate()
74 for (Elf_Sym *sym = elf->symtab_start; sym < elf->symtab_stop; sym++) { in symsearch_populate()
75 if (is_valid_name(elf, sym)) { in symsearch_populate()
78 table->symbol_index = sym - elf->symtab_start; in symsearch_populate()
79 table->section_index = get_secindex(elf, sym); in symsearch_populate()
124 void symsearch_init(struct elf_info *elf) in symsearch_init() argument
[all …]
Dmodpost.c711 static const char *sym_name(struct elf_info *elf, Elf_Sym *sym) in sym_name() argument
713 return sym ? elf->strtab + sym->st_name : ""; in sym_name()
771 static void check_section(const char *modname, struct elf_info *elf, in check_section() argument
774 const char *sec = sech_name(elf, sechdr); in check_section()
987 static Elf_Sym *find_fromsym(struct elf_info *elf, Elf_Addr addr, in find_fromsym() argument
990 return symsearch_find_nearest(elf, addr, secndx, false, ~0); in find_fromsym()
993 static Elf_Sym *find_tosym(struct elf_info *elf, Elf_Addr addr, Elf_Sym *sym) in find_tosym() argument
998 if (is_valid_name(elf, sym)) in find_tosym()
1005 new_sym = symsearch_find_nearest(elf, addr, get_secindex(elf, sym), in find_tosym()
1010 static bool is_executable_section(struct elf_info *elf, unsigned int secndx) in is_executable_section() argument
[all …]
Dmodpost.h155 static inline bool is_valid_name(struct elf_info *elf, Elf_Sym *sym) in is_valid_name() argument
157 const char *name = elf->strtab + sym->st_name; in is_valid_name()
165 void symsearch_init(struct elf_info *elf);
166 void symsearch_finish(struct elf_info *elf);
167 Elf_Sym *symsearch_find_nearest(struct elf_info *elf, Elf_Addr addr,
/scripts/gendwarfksyms/
Dkabi.c124 Elf *elf; in kabi_read_rules() local
162 elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); in kabi_read_rules()
163 if (!elf) in kabi_read_rules()
166 if (elf_getshdrstrndx(elf, &shstrndx) < 0) in kabi_read_rules()
169 scn = elf_nextscn(elf, NULL); in kabi_read_rules()
178 sname = elf_strptr(elf, shstrndx, shdr->sh_name); in kabi_read_rules()
189 scn = elf_nextscn(elf, scn); in kabi_read_rules()
194 check(elf_end(elf)); in kabi_read_rules()
246 check(elf_end(elf)); in kabi_read_rules()
Dsymbols.c200 Elf *elf; in elf_for_each_global() local
205 elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); in elf_for_each_global()
206 if (!elf) in elf_for_each_global()
209 scn = elf_nextscn(elf, NULL); in elf_for_each_global()
223 scn = elf_nextscn(elf, scn); in elf_for_each_global()
226 sym_size = gelf_fsize(elf, ELF_T_SYM, 1, EV_CURRENT); in elf_for_each_global()
227 scn = elf_nextscn(elf, NULL); in elf_for_each_global()
266 name = elf_strptr(elf, shdr->sh_link, in elf_for_each_global()
278 scn = elf_nextscn(elf, scn); in elf_for_each_global()
281 check(elf_end(elf)); in elf_for_each_global()