Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e947f1e authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

tools lib symbol: Rename kallsyms2elf_type to kallsyms2elf_binding

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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent a5e813c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -9,7 +9,7 @@
#define KSYM_NAME_LEN 256
#define KSYM_NAME_LEN 256
#endif
#endif


static inline u8 kallsyms2elf_type(char type)
static inline u8 kallsyms2elf_binding(char type)
{
{
	if (type == 'W')
	if (type == 'W')
		return STB_WEAK;
		return STB_WEAK;
+1 −1
Original line number Original line Diff line number Diff line
@@ -624,7 +624,7 @@ static int map__process_kallsym_symbol(void *arg, const char *name,
	 * symbols, setting length to 0, and rely on
	 * symbols, setting length to 0, and rely on
	 * symbols__fixup_end() to fix it up.
	 * symbols__fixup_end() to fix it up.
	 */
	 */
	sym = symbol__new(start, 0, kallsyms2elf_type(type), name);
	sym = symbol__new(start, 0, kallsyms2elf_binding(type), name);
	if (sym == NULL)
	if (sym == NULL)
		return -ENOMEM;
		return -ENOMEM;
	/*
	/*