0001
0002 #ifndef __TOOLS_KALLSYMS_H_
0003 #define __TOOLS_KALLSYMS_H_ 1
0004
0005 #include <elf.h>
0006 #include <linux/ctype.h>
0007 #include <linux/types.h>
0008
0009 #ifndef KSYM_NAME_LEN
0010 #define KSYM_NAME_LEN 256
0011 #endif
0012
0013 static inline u8 kallsyms2elf_binding(char type)
0014 {
0015 if (type == 'W')
0016 return STB_WEAK;
0017
0018 return isupper(type) ? STB_GLOBAL : STB_LOCAL;
0019 }
0020
0021 u8 kallsyms2elf_type(char type);
0022
0023 bool kallsyms__is_function(char symbol_type);
0024
0025 int kallsyms__parse(const char *filename, void *arg,
0026 int (*process_symbol)(void *arg, const char *name,
0027 char type, u64 start));
0028
0029 #endif