summaryrefslogtreecommitdiff
path: root/tools/perf/util/symbol-elf.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2019-03-26 15:21:59 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-03-26 15:21:59 -0400
commit0f96371a30f16f6244195c717b9e2b2f42aa4e89 (patch)
tree3f42b4abf3a7643ddd06f0c7727f2e3b06798c3c /tools/perf/util/symbol-elf.c
parente021bb4fb77a8782d21cab4cb0702778fc3784c7 (diff)
parentce194fa2b267e2018f42442347d90df01c4071d6 (diff)
Merge tag 'v4.19.29' into v4.19-rt
This is the 4.19.29 stable release Conflicts: drivers/irqchip/irq-gic-v3-its.c
Diffstat (limited to 'tools/perf/util/symbol-elf.c')
-rw-r--r--tools/perf/util/symbol-elf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 6e70cc00c161..a701a8a48f00 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -87,6 +87,11 @@ static inline uint8_t elf_sym__type(const GElf_Sym *sym)
return GELF_ST_TYPE(sym->st_info);
}
+static inline uint8_t elf_sym__visibility(const GElf_Sym *sym)
+{
+ return GELF_ST_VISIBILITY(sym->st_other);
+}
+
#ifndef STT_GNU_IFUNC
#define STT_GNU_IFUNC 10
#endif
@@ -111,7 +116,9 @@ static inline int elf_sym__is_label(const GElf_Sym *sym)
return elf_sym__type(sym) == STT_NOTYPE &&
sym->st_name != 0 &&
sym->st_shndx != SHN_UNDEF &&
- sym->st_shndx != SHN_ABS;
+ sym->st_shndx != SHN_ABS &&
+ elf_sym__visibility(sym) != STV_HIDDEN &&
+ elf_sym__visibility(sym) != STV_INTERNAL;
}
static bool elf_sym__filter(GElf_Sym *sym)