lkml.org 
[lkml]   [2019]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] objtool: Replace STACK_FRAME_NON_STANDARD annotation
On Mon, Feb 25, 2019 at 10:11:24AM -0600, Josh Poimboeuf wrote:
> On Mon, Feb 25, 2019 at 01:43:34PM +0100, Peter Zijlstra wrote:

> > -#define STACK_FRAME_NON_STANDARD(func) \
> > - static void __used __section(.discard.func_stack_frame_non_standard) \
> > - *__func_stack_frame_non_standard_##func = func
> > +#define STACK_FRAME_NON_STANDARD(func) \
> > + asm (".pushsection .discard.nonstd_frame_strtab, \"S\", @3\n\t" \
> > + "999: .ascii \"" #func "\"\n\t" \
> > + " .byte 0\n\t" \
> > + ".popsection\n\t" \
> > + ".pushsection .discard.nonstd_frame\n\t" \
> > + ".long 999b - .\n\t" \
> > + ".popsection\n\t")
> > +
>
> I don't think this will work in the case where GCC does an IPA
> optimization and renames the function (e.g., renames func to
> func.isra.1234), right? That might be a deal breaker...

Or; as has been found by 0day; the whole function gets inlined and
the symbol no longer exists at all.

That's curable with a noinline, but all things considered, I think we
should go back to the old horrible scheme. Andy?

\
 
 \ /
  Last update: 2019-02-27 13:21    [W:0.063 / U:5.096 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site