From: Li Zhijian <lizhijian@cn.fujitsu.com>
To: <linux-kernel@vger.kernel.org>, <acme@kernel.org>
Cc: <philip.li@intel.com>, <brueckner@linux.vnet.ibm.com>,
Thomas Richter <tmricht@linux.vnet.ibm.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH] perf test shell: Add -D to check dynamic symbols for ubuntu/debian
Date: Wed, 9 May 2018 15:36:58 +0800 [thread overview]
Message-ID: <0dbb982d-9cca-cd13-9a31-cc2f6e93a748@cn.fujitsu.com> (raw)
In-Reply-To: <1514364645-1205-1-git-send-email-lizhijian@cn.fujitsu.com>
ping
On 12/27/2017 04:50 PM, Li Zhijian wrote:
> 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 <tmricht@linux.vnet.ibm.com>
> CC: Arnaldo Carvalho de Melo <acme@redhat.com>
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> ---
> 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
next prev parent reply other threads:[~2018-05-09 7:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-27 8:50 [PATCH] perf test shell: Add -D to check dynamic symbols for ubuntu/debian Li Zhijian
2018-05-09 7:36 ` Li Zhijian [this message]
2018-05-09 7:38 ` Li Zhijian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0dbb982d-9cca-cd13-9a31-cc2f6e93a748@cn.fujitsu.com \
--to=lizhijian@cn.fujitsu.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=brueckner@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=philip.li@intel.com \
--cc=tmricht@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.