Arnaldo Carvalho de Melo | c506c96 | 2013-12-11 09:15:00 -0300 | [diff] [blame] | 1 | #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 Melo | 8e947f1 | 2015-09-30 12:42:07 -0300 | [diff] [blame] | 12 | static inline u8 kallsyms2elf_binding(char type) |
Arnaldo Carvalho de Melo | c506c96 | 2013-12-11 09:15:00 -0300 | [diff] [blame] | 13 | { |
| 14 | if (type == 'W') |
| 15 | return STB_WEAK; |
| 16 | |
| 17 | return isupper(type) ? STB_GLOBAL : STB_LOCAL; |
| 18 | } |
| 19 | |
Arnaldo Carvalho de Melo | f845086 | 2015-09-30 13:02:08 -0300 | [diff] [blame^] | 20 | u8 kallsyms2elf_type(char type); |
| 21 | |
Arnaldo Carvalho de Melo | c506c96 | 2013-12-11 09:15:00 -0300 | [diff] [blame] | 22 | int 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_ */ |