blob: 4071316a766ef95023853f61ed1a27c9477aa898 [file] [log] [blame]
Arnaldo Carvalho de Meloc506c962013-12-11 09:15:00 -03001#ifndef __TOOLS_KALLSYMS_H_
2#define __TOOLS_KALLSYMS_H_ 1
3
4#include <elf.h>
5#include <linux/ctype.h>
6#include <linux/types.h>
7
8#ifndef KSYM_NAME_LEN
9#define KSYM_NAME_LEN 256
10#endif
11
Arnaldo Carvalho de Melo8e947f12015-09-30 12:42:07 -030012static inline u8 kallsyms2elf_binding(char type)
Arnaldo Carvalho de Meloc506c962013-12-11 09:15:00 -030013{
14 if (type == 'W')
15 return STB_WEAK;
16
17 return isupper(type) ? STB_GLOBAL : STB_LOCAL;
18}
19
Arnaldo Carvalho de Melof8450862015-09-30 13:02:08 -030020u8 kallsyms2elf_type(char type);
21
Arnaldo Carvalho de Meloc506c962013-12-11 09:15:00 -030022int kallsyms__parse(const char *filename, void *arg,
23 int (*process_symbol)(void *arg, const char *name,
24 char type, u64 start));
25
26#endif /* __TOOLS_KALLSYMS_H_ */