lkml.org 
[lkml]   [2022]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/18] objtool: Support data symbol printing
On Thu, Apr 14, 2022 at 09:05:47AM +0200, Peter Zijlstra wrote:
> On Wed, Apr 13, 2022 at 04:19:37PM -0700, Josh Poimboeuf wrote:
>
> > @@ -34,8 +37,8 @@ static inline char *offstr(struct section *sec, unsigned long offset)
> >
> > str = malloc(strlen(name) + 20);
> >
> > - if (func)
> > - sprintf(str, "%s()+0x%lx", name, name_off);
> > + if (sym)
> > + sprintf(str, "%s%s+0x%lx", name, is_text ? "()" : "", name_off);
> > else
> > sprintf(str, "%s+0x%lx", name, name_off);
>
> So I like the patch, except that "()" thing is something where we differ
> from the kernel's %ps format and I've cursed it a number of times
> because I then have to manually edit (iow remove) things when pasting it
> in various scripts etc..

Oh, hm, that's true. I can remove them if you prefer.

> That said, it totally makes sense to differentiate between a text and
> data symbol this way :/

Yes, but if we're keeping the "Add sec+offset to warnings" patch then
that distinction is already (kind of) being made by showing the data
section name. And the data symbol warnings should be rare.

--
Josh

\
 
 \ /
  Last update: 2022-04-14 17:58    [W:0.111 / U:2.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site