blob: bc40101d72c189a882842f84ee492924a50e29ce [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Arnaldo Carvalho de Meloc506c962013-12-11 09:15:00 -03002#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 Melo8e947f12015-09-30 12:42:07 -030013static inline u8 kallsyms2elf_binding(char type)
Arnaldo Carvalho de Meloc506c962013-12-11 09:15:00 -030014{
15 if (type == 'W')
16 return STB_WEAK;
17
18 return isupper(type) ? STB_GLOBAL : STB_LOCAL;
19}
20
Arnaldo Carvalho de Melof8450862015-09-30 13:02:08 -030021u8 kallsyms2elf_type(char type);
22
Arnaldo Carvalho de Meloc506c962013-12-11 09:15:00 -030023int 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_ */