[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72kEUEskKC=qA5q1ZiAJC9KKUcndVh6iZx_vJ1P=injF-g@mail.gmail.com>
Date: Mon, 19 Apr 2021 23:03:23 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: dsterba@...e.cz, Peter Zijlstra <peterz@...radead.org>,
Miguel Ojeda <ojeda@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
rust-for-linux <rust-for-linux@...r.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Linux Doc Mailing List <linux-doc@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Geoffrey Thomas <geofft@...reload.com>,
Finn Behrens <me@...enk.de>,
Adam Bratschi-Kaye <ark.email@...il.com>,
Wedson Almeida Filho <wedsonaf@...gle.com>,
Michael Ellerman <mpe@...erman.id.au>
Subject: Re: [PATCH 04/13] Kbuild: Rust support
On Mon, Apr 19, 2021 at 10:18 PM Matthew Wilcox <willy@...radead.org> wrote:
>
> Yes, I agree, we need a better story for name mangling.
> My proposal is that we store a pretty name which matches the source
> (eg rust_binder::range_alloc) and a sha1 of the mangled symbol
> (40 bytes of uninteresting hex). Symbol resolution is performed against
> the sha1. Printing is of the pretty name. It should be obvious from
> the stack trace which variant of a function is being called, no?
If the pretty name is only `rust_binder::range_alloc`, that would not
be enough, since (in this case) that is a module name (i.e. the
namespace of the `DescriptorState` type). The function being called
here is `fmt` (the one outside the `<>`), which is a method of the
`Debug` trait.
We could perhaps reduce this down to:
rust_binder::range_alloc::DescriptorState::fmt
without much ambiguity (in most cases).
Cheers,
Miguel
Powered by blists - more mailing lists