Messages in this thread | | | Date | Wed, 27 Mar 2019 15:39:45 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH 02/17] x86, lto: Mark all top level asm statements as .text |
| |
* Thomas Gleixner <tglx@linutronix.de> wrote:
> Proper fix below. > > Thanks, > > tglx > > 8<------------------- > > --- a/arch/x86/include/asm/paravirt_types.h > +++ b/arch/x86/include/asm/paravirt_types.h > @@ -367,11 +367,15 @@ extern struct paravirt_patch_template pv > _paravirt_alt(insn_string, "%c[paravirt_typenum]", "%c[paravirt_clobber]") > > /* 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[]; \ > + asm(".pushsection .rodata, \"a\"\n" \ > + NATIVE_LABEL("start_", ops, name) \ > + code \ > + NATIVE_LABEL("end_", ops, name) \ > + ".popsection\n")
Acked-by: Ingo Molnar <mingo@kernel.org>
Thanks,
Ingo
| |