From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751829AbdL0IvB (ORCPT ); Wed, 27 Dec 2017 03:51:01 -0500 Received: from mga05.intel.com ([192.55.52.43]:1369 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbdL0Iu6 (ORCPT ); Wed, 27 Dec 2017 03:50:58 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,464,1508828400"; d="scan'208";a="16839243" From: Li Zhijian To: linux-kernel@vger.kernel.org, acme@kernel.org Cc: philip.li@intel.com, brueckner@linux.vnet.ibm.com, Li Zhijian , Thomas Richter , Arnaldo Carvalho de Melo Subject: [PATCH] perf test shell: Add -D to check dynamic symbols for ubuntu/debian Date: Wed, 27 Dec 2017 16:50:45 +0800 Message-Id: <1514364645-1205-1-git-send-email-lizhijian@cn.fujitsu.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Ubuntu and Debian, we can't find any symbol including "inet_pton" from 'nm -g' root@vm-lkp-nex04-8G-5 ~# nm -g /lib/x86_64-linux-gnu/libc-2.25.so | grep inet_pton nm: /lib/x86_64-linux-gnu/libc-2.25.so: no symbols it looks libc.so has different symbol compositions at different distros Usage: nm [option(s)] [file(s)] List symbols in [file(s)] (a.out by default). The options are: ...snip... -D, --dynamic Display dynamic symbols instead of normal symbols --defined-only Display only defined symbols -e (ignored) -f, --format=FORMAT Use the output format FORMAT. FORMAT can be `bsd', `sysv' or `posix'. The default is `bsd' -g, --extern-only Display only external symbols I tested both debian/ubuntu and RHEL, they work as expected CC: Thomas Richter CC: Arnaldo Carvalho de Melo Signed-off-by: Li Zhijian --- tools/perf/tests/shell/trace+probe_libc_inet_pton.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh index 8b3da21..f939bd6 100755 --- a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh +++ b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh @@ -11,7 +11,7 @@ . $(dirname $0)/lib/probe.sh libc=$(grep -w libc /proc/self/maps | head -1 | sed -r 's/.*[[:space:]](\/.*)/\1/g') -nm -g $libc 2>/dev/null | fgrep -q inet_pton || exit 254 +nm -gD $libc 2>/dev/null | fgrep -q inet_pton || exit 254 trace_libc_inet_pton_backtrace() { idx=0 -- 2.7.4