Skip to contentSkip to conversation

tools lib symbol: Rename kallsyms2elf_type to kallsyms2elf_binding

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Oct 1, 2015 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  8e947f1e84fd1588f66e5f2ea69c80647de72cd4
Gitweb:     http://git.kernel.org/tip/8e947f1e84fd1588f66e5f2ea69c80647de72cd4
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Wed, 30 Sep 2015 12:42:07 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 30 Sep 2015 18:34:30 -0300

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()

---
 tools/lib/symbol/kallsyms.h | 2 +-
 tools/perf/util/symbol.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tools/lib/symbol/kallsyms.h +1 -1
index 6084f5e..bb86c5b7 100644
@@ -9,7 +9,7 @@
 #define KSYM_NAME_LEN 256
 #endif
 
-static inline u8 kallsyms2elf_type(char type)
+static inline u8 kallsyms2elf_binding(char type)
 {
 	if (type == 'W')
 		return STB_WEAK;
tools/perf/util/symbol.c +1 -1
index 1f97ffb..bcda43b 100644
@@ -624,7 +624,7 @@ static int map__process_kallsym_symbol(void *arg, const char *name,
 	 * symbols, setting length to 0, and rely on
 	 * 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)
 		return -ENOMEM;
 	/*