All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Pohlack <mpohlack@amazon.com>
To: Jan Beulich <JBeulich@suse.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Elena Ufimtseva <elena.ufimtseva@oracle.com>,
	jeremy@goop.org, hanweidong@huawei.com,
	john.liuqiming@huawei.com,
	Paul Voccio <paul.voccio@rackspace.com>,
	xen-devel@lists.xenproject.org,
	Daniel Kiper <daniel.kiper@oracle.com>,
	Major Hayden <major.hayden@rackspace.com>,
	liuyingdong@huawei.com, aliguori@amazon.com, konrad@darnok.org,
	lars.kurth@citrix.com,
	Steven Wilson <steven.wilson@rackspace.com>,
	peter.huangpeng@huawei.com, msw@amazon.com,
	xiantao.zxt@alibaba-inc.com,
	Rick Harris <rick.harris@rackspace.com>,
	boris.ostrovsky@oracle.com,
	Josh Kearney <josh.kearney@rackspace.com>,
	jinsong.liu@alibaba-inc.com,
	Antony Messerli <amesserl@rackspace.com>,
	fanhenglong@huawei.com, andrew.cooper3@citrix.com
Subject: Re: [RFC v2] xSplice design
Date: Mon, 08 Jun 2015 10:34:44 +0200	[thread overview]
Message-ID: <557553A4.5000104@amazon.com> (raw)
In-Reply-To: <5571DBE602000078000817AA@mail.emea.novell.com>

On 05.06.2015 17:27, Jan Beulich wrote:
>>>> On 05.06.15 at 17:00, <konrad.wilk@oracle.com> wrote:
>> On Wed, May 20, 2015 at 05:11:20PM +0200, Martin Pohlack wrote:
>>> * Xen as it is now, has a couple of non-unique symbol names which will
>>>   make runtime symbol identification hard.  Sometimes, static symbols
>>>   simply have the same name in C files, sometimes such symbols get
>>>   included via header files, and some C files are also compiled
>>>   multiple times and linked under different names (guest_walk.c).  I
>>>   think the Linux kernel solves this by aiming at unique symbol names
>>>   even for local symbols.
>>>
>>>   nm xen-syms | cut -f3- -d\  | sort | uniq -c | sort -nr | head
>>
>> Oh my. Looks like a couple of prepartion patches will be in order!
> 
> Just because nm doesn't express this doesn't mean we have to
> special case them: In ELF (and in COFF too, which is relevant as
> long as xen.efi still remains to be a separate binary) static symbols
> can easily be qualified by their source or object file name - the
> symbol table certainly has that information available. As said on
> the hackathon, our current kallsyms mechanism - using nm output -
> suffers from this too, yet I personally view it as rather bad practice
> to add a globally unique prefix to local symbol names. Instead, as
> also said there, we should switch to consuming the full ELF symbol
> table. That's been on my todo list for two years or more - if only I
> would ever get the time to do things like that...

Hmm, in my experience, you have file-type symbols in the symbol table
that refer to source-code files and you have source-file references in
the dwarf debug information.

I have *not* seen references to object-files in either place and as some
C-files are compiled multiple times in Xen (guest_walk.c), the mapping
is not unique.

Further, as soon as non-trivial linker scripts are used, the symbol
ordering in the final xen-syms does not necessarily reflect original
object-file contents anymore.

I might be missing some mechanism here?

Martin

  reply	other threads:[~2015-06-08  8:35 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 19:44 [RFC v2] xSplice design Konrad Rzeszutek Wilk
2015-05-18 12:41 ` Jan Beulich
2015-06-05 14:49   ` Konrad Rzeszutek Wilk
2015-06-05 15:16     ` Jan Beulich
2015-06-05 16:00       ` Konrad Rzeszutek Wilk
2015-06-05 16:14         ` Jan Beulich
2015-05-18 12:54 ` Liuqiming (John)
2015-05-18 13:11   ` Daniel Kiper
2015-06-05 14:50   ` Konrad Rzeszutek Wilk
2015-05-19 19:13 ` Lars Kurth
2015-05-20 15:11 ` Martin Pohlack
2015-06-05 15:00   ` Konrad Rzeszutek Wilk
2015-06-05 15:15     ` Andrew Cooper
2015-06-05 15:27     ` Jan Beulich
2015-06-08  8:34       ` Martin Pohlack [this message]
2015-06-08  8:51         ` Jan Beulich
2015-06-08 14:38     ` Martin Pohlack
2015-06-08 15:19       ` Konrad Rzeszutek Wilk
2015-06-12 11:51         ` Martin Pohlack
2015-06-12 14:06           ` Konrad Rzeszutek Wilk
2015-06-12 11:39 ` Martin Pohlack
2015-06-12 14:03   ` Konrad Rzeszutek Wilk
2015-06-12 14:31     ` Martin Pohlack
2015-06-12 14:43       ` Jan Beulich
2015-06-12 17:31         ` Martin Pohlack
2015-06-12 18:46           ` Konrad Rzeszutek Wilk
2015-06-12 16:09       ` Konrad Rzeszutek Wilk
2015-06-12 16:17         ` Andrew Cooper
2015-06-12 16:39           ` Konrad Rzeszutek Wilk
2015-06-12 18:36             ` Martin Pohlack
2015-06-12 18:51               ` Konrad Rzeszutek Wilk
2015-07-06 19:36         ` Konrad Rzeszutek Wilk
2015-10-27 12:05   ` Ross Lagerwall
2015-10-29 16:55     ` Ross Lagerwall
2015-10-30 10:39       ` Martin Pohlack
2015-10-30 14:03         ` Ross Lagerwall
2015-10-30 14:06           ` Martin Pohlack

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=557553A4.5000104@amazon.com \
    --to=mpohlack@amazon.com \
    --cc=JBeulich@suse.com \
    --cc=aliguori@amazon.com \
    --cc=amesserl@rackspace.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=daniel.kiper@oracle.com \
    --cc=elena.ufimtseva@oracle.com \
    --cc=fanhenglong@huawei.com \
    --cc=hanweidong@huawei.com \
    --cc=jeremy@goop.org \
    --cc=jinsong.liu@alibaba-inc.com \
    --cc=john.liuqiming@huawei.com \
    --cc=josh.kearney@rackspace.com \
    --cc=konrad.wilk@oracle.com \
    --cc=konrad@darnok.org \
    --cc=lars.kurth@citrix.com \
    --cc=liuyingdong@huawei.com \
    --cc=major.hayden@rackspace.com \
    --cc=msw@amazon.com \
    --cc=paul.voccio@rackspace.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=rick.harris@rackspace.com \
    --cc=steven.wilson@rackspace.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xiantao.zxt@alibaba-inc.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.