lkml.org 
[lkml]   [2019]   [Mar]   [27]   [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, 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

\
 
 \ /
  Last update: 2019-03-27 16:09    [W:0.067 / U:6.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site