[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1903272217240.1789@nanos.tec.linutronix.de>
Date: Wed, 27 Mar 2019 22:55:44 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Andi Kleen <ak@...ux.intel.com>
cc: Andi Kleen <andi@...stfloor.org>, x86@...nel.org,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH 02/17] x86, lto: Mark all top level asm statements as
.text
On Wed, 27 Mar 2019, Andi Kleen wrote:
> >
> > It's static so it's scope is within the file and whatever GCC does with
> > that C function it has to respect that it accesses static data. If that's
> > not true then this really needs to be fixed at the compiler side and not in
> > the kernel.
>
> Ok so you did the statics with undefined size, so kind of an extern static.
> That's a weird construct (not sure if it's even allowed in standard C), but
> somehow it seems to work in gcc with the inline assembler.
Strict C89 does not allow that, but it does not allow a lot of other things
the kernel does.
> I checked the code general and with the .globl in NATIVE_LABEL the
With or without? I removed that as well.
> generated assembler looks like it should work even for LTO yes.
>
> I guess it's an interesting alternative to making them all global.
> Maybe that will work for more cases too.
Pretty much preferred over making static stuff global all over the place.
Thanks,
tglx
Powered by blists - more mailing lists