diff options
author | fabient <fabient@FreeBSD.org> | 2010-05-06 20:54:19 +0000 |
---|---|---|
committer | fabient <fabient@FreeBSD.org> | 2010-05-06 20:54:19 +0000 |
commit | e56405ea52db77025a29b33ea16fdfb0a016fa51 (patch) | |
tree | b3e276451d3cc7c0434a1980a5e650946302625a /usr.sbin/pmcstat | |
parent | 67cbc172f7eb16b0be50f140cf1c43e52fb1f664 (diff) | |
download | FreeBSD-src-e56405ea52db77025a29b33ea16fdfb0a016fa51.zip FreeBSD-src-e56405ea52db77025a29b33ea16fdfb0a016fa51.tar.gz |
Exclude undefined symbol from ELF file when doing function resolve.
MFC after: 3 days
Diffstat (limited to 'usr.sbin/pmcstat')
-rw-r--r-- | usr.sbin/pmcstat/pmcstat_log.c | 2 |
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. */ |