lkml.org 
[lkml]   [2019]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/17] x86, lto: Mark all top level asm statements as .text
On Wed, 27 Mar 2019, Thomas Gleixner wrote:
> On Wed, 27 Mar 2019, Andi Kleen wrote:
>
> > > > I checked the code general and with the .globl in NATIVE_LABEL the
> > >
> > > With or without? I removed that as well.
> >
> > With.
> >
> > LTO would still need the .globls because the variable and the asm
> > statement can end up in different assembler files, and resolution
> > would rely on the linker.
>
> This really sucks. As this is a constant source of trouble, we might better
> bite the bullet and get rid of this fancy macro completely. It's not that
> we add these patch patterns every other day.
>
> So a good old:
>
> /* xor %eax %ex */
> static const unsigend char patch_qspinlock[] = { 0x31, 0xc0 };
>
> and then in the patch code:
>
> return paravirt_patch_insns(ibuf, len, patch_qspinlock,
> patch_qspinlock + ARRAY_SIZE(patch_qspinlock));
>
> might be less trouble than dealing with that clever inline assembly
> forever.

Just for the record. GCC people have confirmed that all the constructs suck
in one way or the other and are just working by chance. So the above is the
sanest solution.

Thanks,

tglx


\
 
 \ /
  Last update: 2019-04-02 10:55    [W:0.172 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site