8e947f1e84
It is about binding, not type, we have just a letter in kallsyms that should map both for the ELF type (STT_FUNC, etc) and to the ELF symbol binding (STB_WEAK, STB_GLOBAL, etc), so rename it now before introducing kallsyms2_elf_type() Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-uu5vj343ms1q2wm55690on6v@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
25 lines
498 B
C
25 lines
498 B
C
#ifndef __TOOLS_KALLSYMS_H_
|
|
#define __TOOLS_KALLSYMS_H_ 1
|
|
|
|
#include <elf.h>
|
|
#include <linux/ctype.h>
|
|
#include <linux/types.h>
|
|
|
|
#ifndef KSYM_NAME_LEN
|
|
#define KSYM_NAME_LEN 256
|
|
#endif
|
|
|
|
static inline u8 kallsyms2elf_binding(char type)
|
|
{
|
|
if (type == 'W')
|
|
return STB_WEAK;
|
|
|
|
return isupper(type) ? STB_GLOBAL : STB_LOCAL;
|
|
}
|
|
|
|
int kallsyms__parse(const char *filename, void *arg,
|
|
int (*process_symbol)(void *arg, const char *name,
|
|
char type, u64 start));
|
|
|
|
#endif /* __TOOLS_KALLSYMS_H_ */
|