return index;
}
-static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym)
+ /*
+ * If there's no name there, ignore it; likewise, ignore it if it's
+ * one of the magic symbols emitted used by current tools.
+ *
+ * Internal symbols created by tools should be ignored by modpost.
+ */
- return 0;
++static inline bool is_valid_name(struct elf_info *elf, Elf_Sym *sym)
+ {
+ const char *name = elf->strtab + sym->st_name;
+
+ if (!name || !strlen(name))
++ return false;
+ return !is_mapping_symbol(name);
+ }
+
+ /* symsearch.c */
+ void symsearch_init(struct elf_info *elf);
+ void symsearch_finish(struct elf_info *elf);
+ Elf_Sym *symsearch_find_nearest(struct elf_info *elf, Elf_Addr addr,
+ unsigned int secndx, bool allow_negative,
+ Elf_Addr min_distance);
+
/* file2alias.c */
void handle_moddevtable(struct module *mod, struct elf_info *info,
Elf_Sym *sym, const char *symname);