From owner-svn-src-head@FreeBSD.ORG Thu May 6 20:54:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5741106566B; Thu, 6 May 2010 20:54:19 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C51FD8FC13; Thu, 6 May 2010 20:54:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46KsJBK087524; Thu, 6 May 2010 20:54:19 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46KsJOu087523; Thu, 6 May 2010 20:54:19 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201005062054.o46KsJOu087523@svn.freebsd.org> From: Fabien Thomas Date: Thu, 6 May 2010 20:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207731 - head/usr.sbin/pmcstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 20:54:19 -0000 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. */