1b2441318SGreg Kroah-Hartman/* SPDX-License-Identifier: GPL-2.0 */ 23a99e6dbSIngo Molnar 33a99e6dbSIngo Molnar/* Various wrappers to make the kernel .S file build in user-space: */ 43a99e6dbSIngo Molnar 5*7f02ce62SArnaldo Carvalho de Melo// memcpy_orig is being defined as SYM_L_LOCAL but we need it 6db1a8b97SArnaldo Carvalho de Melo#define SYM_FUNC_START_LOCAL(name) \ 7db1a8b97SArnaldo Carvalho de Melo SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) 89ea81197SJan Beulich#define memcpy MEMCPY /* don't hide glibc's memcpy() */ 9800eb014SJan Beulich#define altinstr_replacement text 10800eb014SJan Beulich#define globl p2align 4; .globl 113a99e6dbSIngo Molnar#define _ASM_EXTABLE_FAULT(x, y) 121f27a050SArnaldo Carvalho de Melo#define _ASM_EXTABLE(x, y) 133a99e6dbSIngo Molnar 147d7d1bf1SArnaldo Carvalho de Melo#include "../../arch/x86/lib/memcpy_64.S" 157a0153eeSJiri Olsa/* 167a0153eeSJiri Olsa * We need to provide note.GNU-stack section, saying that we want 177a0153eeSJiri Olsa * NOT executable stack. Otherwise the final linking will assume that 187a0153eeSJiri Olsa * the ELF stack should not be restricted at all and set it RWX. 197a0153eeSJiri Olsa */ 207a0153eeSJiri Olsa.section .note.GNU-stack,"",@progbits 21