[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1903271600050.1789@nanos.tec.linutronix.de>
Date: Wed, 27 Mar 2019 16:08:40 +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:
> On Wed, Mar 27, 2019 at 03:20:08PM +0100, Thomas Gleixner wrote:
> > /* Simple instruction patching code. */
> > -#define NATIVE_LABEL(a,x,b) "\n\t.globl " a #x "_" #b "\n" a #x "_" #b ":\n\t"
> > +#define NATIVE_LABEL(a,x,b) "\n" a #x "_" #b ":\n\t"
> >
> > #define DEF_NATIVE(ops, name, code) \
> > - __visible extern const char start_##ops##_##name[], end_##ops##_##name[]; \
> > - asm(NATIVE_LABEL("start_", ops, name) code NATIVE_LABEL("end_", ops, name))
> > + static const char start_##ops##_##name[], end_##ops##_##name[]; \
>
> Please don't apply the static/__visible removal hunk, I will just need to
> revert it again for LTO.
Why on earth is this needed for LTO?
>From the GCC manual:
"This attribute, attached to a global variable or function, nullifies the
effect of the -fw hole-program command-line option, so the object remains
visible outside the current compilation unit."
Neither the variable nor the data generated are global anymore. This data
is only used inside this compilation unit and I don't see why LTO needs a
reference outside of it. If so, then I really want to understand WHY
exactly.
Thanks,
tglx
Powered by blists - more mailing lists