linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Zhijian <lizhijian@cn.fujitsu.com>
To: Kim Phillips <kim.phillips@arm.com>
Cc: <linux-kernel@vger.kernel.org>, <acme@kernel.org>,
	<peterz@infradead.org>, <mingo@redhat.com>,
	<alexander.shishkin@linux.intel.com>, <jolsa@redhat.com>,
	<namhyung@kernel.org>, <philip.li@intel.com>,
	Thomas Richter <tmricht@linux.vnet.ibm.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH v2] perf test shell: Add -D to check dynamic symbols for ubuntu/debian
Date: Thu, 10 May 2018 09:11:32 +0800	[thread overview]
Message-ID: <81202e37-a9c2-1385-a32d-0f78d233e22a@cn.fujitsu.com> (raw)
In-Reply-To: <20180509164108.3fd8f5c71c2fa11d0c474067@arm.com>

The input file is from
lizhijian@haswell-OptiPlex-9020:~/lkp/linux/tools/perf/tests/shell$ grep libc= -A1  record+probe_libc_inet_pton.sh
libc=$(grep -w libc /proc/self/maps | head -1 | sed -r 's/.*[[:space:]](\/.*)/\1/g')
nm -gD $libc 2>/dev/null | fgrep -q inet_pton || exit 254

It mostly points to a striped libc.so(the runtime library)
lizhijian@haswell-OptiPlex-9020:~/lkp/linux/tools/perf/tests/shell$ grep -w libc /proc/self/maps | head -1 | sed -r 's/.*[[:space:]](\/.*)/\1/g'
/lib/x86_64-linux-gnu/libc-2.23.so

Although we can get the expected symbol from the debug library, it still doesn't work for this case.

Thanks
Zhijian


On 05/10/2018 05:41 AM, Kim Phillips wrote:
> On Wed, 9 May 2018 15:45:29 +0800
> Li Zhijian <lizhijian@cn.fujitsu.com> 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
> I'm wondering if that is because libc6-dbg isn't installed?:
>
> ubuntu$ nm -g /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.26.so | grep inet_pton
> 0000000000136340 W inet_pton
> 0000000000136010 T __inet_pton_length
>
> Kim
>
>
> .
>

      reply	other threads:[~2018-05-10  1:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  7:45 [PATCH v2] perf test shell: Add -D to check dynamic symbols for ubuntu/debian Li Zhijian
2018-05-09 21:41 ` Kim Phillips
2018-05-10  1:11   ` Li Zhijian [this message]

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=81202e37-a9c2-1385-a32d-0f78d233e22a@cn.fujitsu.com \
    --to=lizhijian@cn.fujitsu.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=kim.phillips@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).