summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/pmcstat/pmcstat_log.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/pmcstat/pmcstat_log.c b/usr.sbin/pmcstat/pmcstat_log.c
index 6d8c57a..3458bd3 100644
--- a/usr.sbin/pmcstat/pmcstat_log.c
+++ b/usr.sbin/pmcstat/pmcstat_log.c
@@ -539,6 +539,8 @@ pmcstat_image_add_symbols(struct pmcstat_image *image, Elf *e,
return;
if (GELF_ST_TYPE(sym.st_info) != STT_FUNC)
continue;
+ if (sym.st_shndx == STN_UNDEF)
+ continue;
if (!firsttime && pmcstat_symbol_search(image, sym.st_value))
continue; /* We've seen this symbol already. */
OpenPOWER on IntegriCloud