Author: fabient
Date: Thu May  6 20:54:19 2010
New Revision: 207731
URL: http://svn.freebsd.org/changeset/base/207731

Log:
  Exclude undefined symbol from ELF file when doing function resolve.
  
  MFC after: 3 days

Modified:
  head/usr.sbin/pmcstat/pmcstat_log.c

Modified: head/usr.sbin/pmcstat/pmcstat_log.c
==============================================================================
--- head/usr.sbin/pmcstat/pmcstat_log.c Thu May  6 19:23:49 2010        
(r207730)
+++ head/usr.sbin/pmcstat/pmcstat_log.c Thu May  6 20:54:19 2010        
(r207731)
@@ -539,6 +539,8 @@ pmcstat_image_add_symbols(struct pmcstat
                        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. */
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to