mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
![Ian Rogers](/assets/img/avatar_default.png)
hex2u64 is a helper that's out of place in kallsyms.h as not being kallsyms related. Move from kallsyms.h to the only user. Committer notes: Move it out of tools/lib/symbol/kallsyms.c as well, as we had to leave it there in the previous patch lest we break the build. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lore.kernel.org/lkml/20200501221315.54715-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
29 lines
618 B
C
29 lines
618 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#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;
|
|
}
|
|
|
|
u8 kallsyms2elf_type(char type);
|
|
|
|
bool kallsyms__is_function(char symbol_type);
|
|
|
|
int kallsyms__parse(const char *filename, void *arg,
|
|
int (*process_symbol)(void *arg, const char *name,
|
|
char type, u64 start));
|
|
|
|
#endif /* __TOOLS_KALLSYMS_H_ */
|