Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Arnaldo Carvalho de Melo | c506c96 | 2013-12-11 09:15:00 -0300 | [diff] [blame] | 2 | #ifndef __TOOLS_KALLSYMS_H_ |
| 3 | #define __TOOLS_KALLSYMS_H_ 1 |
| 4 | |
| 5 | #include <elf.h> |
| 6 | #include <linux/ctype.h> |
| 7 | #include <linux/types.h> |
| 8 | |
| 9 | #ifndef KSYM_NAME_LEN |
| 10 | #define KSYM_NAME_LEN 256 |
| 11 | #endif |
| 12 | |
Arnaldo Carvalho de Melo | 8e947f1 | 2015-09-30 12:42:07 -0300 | [diff] [blame] | 13 | static inline u8 kallsyms2elf_binding(char type) |
Arnaldo Carvalho de Melo | c506c96 | 2013-12-11 09:15:00 -0300 | [diff] [blame] | 14 | { |
| 15 | if (type == 'W') |
| 16 | return STB_WEAK; |
| 17 | |
| 18 | return isupper(type) ? STB_GLOBAL : STB_LOCAL; |
| 19 | } |
| 20 | |
Arnaldo Carvalho de Melo | f845086 | 2015-09-30 13:02:08 -0300 | [diff] [blame] | 21 | u8 kallsyms2elf_type(char type); |
| 22 | |
Arnaldo Carvalho de Melo | c506c96 | 2013-12-11 09:15:00 -0300 | [diff] [blame] | 23 | int kallsyms__parse(const char *filename, void *arg, |
| 24 | int (*process_symbol)(void *arg, const char *name, |
| 25 | char type, u64 start)); |
| 26 | |
| 27 | #endif /* __TOOLS_KALLSYMS_H_ */ |