Re: [GIT PULL] objtool fixes
From: Josh Poimboeuf
Date: Thu Apr 03 2025 - 11:43:37 EST
On Thu, Apr 03, 2025 at 08:23:55AM -0700, Josh Poimboeuf wrote:
> On Thu, Apr 03, 2025 at 04:52:57PM +0200, Ingo Molnar wrote:
> > +# ./arch/x86/include/asm/smap.h:35: alternative(ANNOTATE_IGNORE_ALTERNATIVE "", "stac", X86_FEATURE_SMAP);
> > #APP
> > # 35 "./arch/x86/include/asm/smap.h" 1
> > # ALT: oldinstr
> > 771:
> > + 911:
> > + .pushsection .discard.annotate_insn,"M",@progbits,8
> > + .long 911b - .
> > + .long 6
> > + .popsection
> >
> > 772:
> > # ALT: padding
> > @@ -140,10 +145,15 @@ copy_from_user_nmi:
> > .popsection
> >
> > # 0 "" 2
> > -# ./arch/x86/include/asm/smap.h:29: alternative("", "clac", X86_FEATURE_SMAP);
> > +# ./arch/x86/include/asm/smap.h:29: alternative(ANNOTATE_IGNORE_ALTERNATIVE "", "clac", X86_FEATURE_SMAP);
> > # 29 "./arch/x86/include/asm/smap.h" 1
> > # ALT: oldinstr
> > 771:
> > + 911:
> > + .pushsection .discard.annotate_insn,"M",@progbits,8
> > + .long 911b - .
> > + .long 6
> > + .popsection
> >
> > 772:
> > # ALT: padding
> >
> > Is there a way to make this more compact, more readable?
>
> Put it all one line? I'm open to ideas :-)
How about adding a comment and making it one line like so?
# OBJTOOL ANNOTATION
911: .pushsection .discard.annotate_insn,"M",@progbits,8; .long 911b - .; .long 6; .popsection
--
Josh