diff options
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 559fb06210f5..226f44a2357d 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -324,8 +324,7 @@ static inline int elf_sym__is_function(const GElf_Sym *sym) | |||
324 | { | 324 | { |
325 | return elf_sym__type(sym) == STT_FUNC && | 325 | return elf_sym__type(sym) == STT_FUNC && |
326 | sym->st_name != 0 && | 326 | sym->st_name != 0 && |
327 | sym->st_shndx != SHN_UNDEF && | 327 | sym->st_shndx != SHN_UNDEF; |
328 | sym->st_size != 0; | ||
329 | } | 328 | } |
330 | 329 | ||
331 | static inline int elf_sym__is_label(const GElf_Sym *sym) | 330 | static inline int elf_sym__is_label(const GElf_Sym *sym) |
@@ -414,7 +413,7 @@ static int dso__synthesize_plt_symbols(struct dso *self, int v) | |||
414 | if (fd < 0) | 413 | if (fd < 0) |
415 | goto out; | 414 | goto out; |
416 | 415 | ||
417 | elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); | 416 | elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); |
418 | if (elf == NULL) | 417 | if (elf == NULL) |
419 | goto out_close; | 418 | goto out_close; |
420 | 419 | ||
@@ -534,7 +533,7 @@ static int dso__load_sym(struct dso *self, int fd, const char *name, | |||
534 | Elf *elf; | 533 | Elf *elf; |
535 | int nr = 0, kernel = !strcmp("[kernel]", self->name); | 534 | int nr = 0, kernel = !strcmp("[kernel]", self->name); |
536 | 535 | ||
537 | elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); | 536 | elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); |
538 | if (elf == NULL) { | 537 | if (elf == NULL) { |
539 | if (v) | 538 | if (v) |
540 | fprintf(stderr, "%s: cannot read %s ELF file.\n", | 539 | fprintf(stderr, "%s: cannot read %s ELF file.\n", |
@@ -676,7 +675,7 @@ static char *dso__read_build_id(struct dso *self, int v) | |||
676 | if (fd < 0) | 675 | if (fd < 0) |
677 | goto out; | 676 | goto out; |
678 | 677 | ||
679 | elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); | 678 | elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); |
680 | if (elf == NULL) { | 679 | if (elf == NULL) { |
681 | if (v) | 680 | if (v) |
682 | fprintf(stderr, "%s: cannot read %s ELF file.\n", | 681 | fprintf(stderr, "%s: cannot read %s ELF file.\n", |