From: Namhyung Kim <namhyung.kim@lge.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/5] perf symbols: Implement poor man's ELF parser
Date: Tue, 22 May 2012 10:08:21 +0900 [thread overview]
Message-ID: <87wr4510qi.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <20120521114739.GC5923@m.brq.redhat.com> (Jiri Olsa's message of "Mon, 21 May 2012 13:47:39 +0200")
Hi, again
On Mon, 21 May 2012 13:47:39 +0200, Jiri Olsa wrote:
> On Mon, May 14, 2012 at 04:10:24PM +0900, Namhyung Kim wrote:
>> Implement minimalistic elf parser for getting build-id.
>> A couple of structs needed are copied from elf.h and
>> the parser only looks for PT_NOTE program header to
>> check build-id.
>> ---
>> tools/perf/util/elf-minimal.h | 153 ++++++++++++++++++++++++
>> tools/perf/util/symbol-minimal.c | 244 ++++++++++++++++++++++++++++++++++++--
>> 2 files changed, 388 insertions(+), 9 deletions(-)
>> create mode 100644 tools/perf/util/elf-minimal.h
>>
>> diff --git a/tools/perf/util/elf-minimal.h b/tools/perf/util/elf-minimal.h
>> new file mode 100644
>> index 000000000000..26540b5718a1
>> --- /dev/null
>> +++ b/tools/perf/util/elf-minimal.h
>> @@ -0,0 +1,153 @@
>> +/*
>> + * Minimal ELF definitions for parsing build-id.
>> + */
>> +/* This file defines standard ELF types, structures, and macros.
>> + Copyright (C) 1995-2003,2004,2005,2006,2007,2008,2009,2010,2011
>> + Free Software Foundation, Inc.
>> + This file is part of the GNU C Library.
>> +
>> + The GNU C Library is free software; you can redistribute it and/or
>> + modify it under the terms of the GNU Lesser General Public
>> + License as published by the Free Software Foundation; either
>> + version 2.1 of the License, or (at your option) any later version.
>> +
>> + The GNU C Library is distributed in the hope that it will be useful,
>> + but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
>> + Lesser General Public License for more details.
>> +
>> + You should have received a copy of the GNU Lesser General Public
>> + License along with the GNU C Library; if not, write to the Free
>> + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
>> + 02111-1307 USA. */
>
> I can see all this exported in:
>
> [jolsa@dhcp-26-214 perf]$ rpm -qf /usr/include/elf.h
> glibc-headers-2.14.90-24.fc16.6.x86_64
>
> so maybe we dont need to add our own, since glic-headers
> seems crutial anyway ;)
>
Thanks for pointing it out. Actually I wanted to be independent to glibc
either, but it seems we tied to it tightly already. Will remove it.
Thanks,
Namhyung
next prev parent reply other threads:[~2012-05-22 1:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 7:10 [RFC 0/5] perf tools: Minimalistic build without libelf dependency Namhyung Kim
2012-05-14 7:10 ` [PATCH 1/5] perf symbols: Introduce symbol__elf_init() Namhyung Kim
2012-05-14 7:10 ` [PATCH 2/5] perf symbols: Do not use ELF's symbol binding constants Namhyung Kim
2012-05-14 7:10 ` [PATCH 3/5] perf tools: Split out util/symbol-elf.c Namhyung Kim
2012-05-21 11:45 ` Jiri Olsa
2012-05-22 1:00 ` Namhyung Kim
2012-05-22 8:35 ` Jiri Olsa
2012-05-14 7:10 ` [PATCH 4/5] perf tools: Support minimal build Namhyung Kim
2012-05-14 7:10 ` [PATCH 5/5] perf symbols: Implement poor man's ELF parser Namhyung Kim
2012-05-21 11:47 ` Jiri Olsa
2012-05-22 1:08 ` Namhyung Kim [this message]
2012-05-22 7:52 ` Peter Zijlstra
2012-05-22 10:26 ` Namhyung Kim
2012-05-22 10:44 ` Peter Zijlstra
2012-05-14 9:22 ` [RFC 0/5] perf tools: Minimalistic build without libelf dependency Ingo Molnar
2012-05-15 0:40 ` Namhyung Kim
2012-05-21 6:00 ` Namhyung Kim
2012-05-21 15:03 ` David Ahern
2012-05-22 0:20 ` Namhyung Kim
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=87wr4510qi.fsf@sejong.aot.lge.com \
--to=namhyung.kim@lge.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
/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.