diff options
| -rw-r--r-- | tools/perf/util/symbol-elf.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 695a73940329..dca7dfae69ad 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c | |||
| @@ -101,6 +101,11 @@ static inline uint8_t elf_sym__type(const GElf_Sym *sym) | |||
| 101 | return GELF_ST_TYPE(sym->st_info); | 101 | return GELF_ST_TYPE(sym->st_info); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | static inline uint8_t elf_sym__visibility(const GElf_Sym *sym) | ||
| 105 | { | ||
| 106 | return GELF_ST_VISIBILITY(sym->st_other); | ||
| 107 | } | ||
| 108 | |||
| 104 | #ifndef STT_GNU_IFUNC | 109 | #ifndef STT_GNU_IFUNC |
| 105 | #define STT_GNU_IFUNC 10 | 110 | #define STT_GNU_IFUNC 10 |
| 106 | #endif | 111 | #endif |
| @@ -125,7 +130,9 @@ static inline int elf_sym__is_label(const GElf_Sym *sym) | |||
| 125 | return elf_sym__type(sym) == STT_NOTYPE && | 130 | return elf_sym__type(sym) == STT_NOTYPE && |
| 126 | sym->st_name != 0 && | 131 | sym->st_name != 0 && |
| 127 | sym->st_shndx != SHN_UNDEF && | 132 | sym->st_shndx != SHN_UNDEF && |
| 128 | sym->st_shndx != SHN_ABS; | 133 | sym->st_shndx != SHN_ABS && |
| 134 | elf_sym__visibility(sym) != STV_HIDDEN && | ||
| 135 | elf_sym__visibility(sym) != STV_INTERNAL; | ||
| 129 | } | 136 | } |
| 130 | 137 | ||
| 131 | static bool elf_sym__filter(GElf_Sym *sym) | 138 | static bool elf_sym__filter(GElf_Sym *sym) |
