Re: [PATCH 0/1] btf_loader support for subprogram linkage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 26, 2024 at 4:00 PM Arnaldo Carvalho de Melo
<acme@xxxxxxxxxx> wrote:
>
> On Mon, Aug 26, 2024 at 12:36:45PM -0400, Will Hawkins wrote:
> > On Mon, Aug 26, 2024 at 10:58 AM Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> > > commit ce516fb0cf2a3d9fc45c2a9c7ab2cf4bd24965a0
> > > Author: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxxxx>
> > > Date:   Sun Jul 8 19:47:26 2007 -0300
>
> > >     [LIB]: Support DW_AT_MIPS_linkage_name
>
> > >     Another C++ specific case:
>
> > >     -       class TypeTemplate ByName(const string  &, size_t);
> > >     +       class TypeTemplate ByName(const string  &, size_t); /* linkage=_ZN4ROOT6Reflex12TypeTemplate6ByNameERKSsj */
>
> > >     Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxxxx>
>
> > > So its not really "static" or "stern", but the mangled name in languages
>
> oops, "extern"
>
> > > such as C++, so I think this patch needs reworking, there is ambiguity
> > > on the "linkage" term, we should use some other term :-\
> >
> > Completely understand! I will rework it and propose something different.
> >
> > I am just thankful that you are so welcoming of the contribution! Your
> > enthusiasm has made a contributor for life!
>
> Another recommendation, please don't point the field to strings like
> "extern" or "static", as DWARF is not language specific, pahole manages
> to handle C mostly, C++ to a great degree but I also used it with Go,
> Rust.
>
> We want to make it more language agnostic, so while the "linkage" as a
> mangled name is not language specific, "static" or "extern" may be.
>
> So just keep it using the DWARF constant/enumeration, so that at
> dwarves_fprintf.c time we can, based on the language encoded in the
> debugging info (for BTF we assume C until we introduce some way to
> encode Rust (The kernel can be written using Rust, so we're bound to
> have something in that direction introduced in BTF at some point)).

100% understood!

Thank you for the feedback!
Will


>
> - Arnaldo





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux