162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci/* Various wrappers to make the kernel .S file build in user-space: */
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci// memcpy_orig is being defined as SYM_L_LOCAL but we need it
662306a36Sopenharmony_ci#define SYM_FUNC_START_LOCAL(name)                      \
762306a36Sopenharmony_ci        SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)
862306a36Sopenharmony_ci#define memcpy MEMCPY /* don't hide glibc's memcpy() */
962306a36Sopenharmony_ci#define altinstr_replacement text
1062306a36Sopenharmony_ci#define globl p2align 4; .globl
1162306a36Sopenharmony_ci#define _ASM_EXTABLE_FAULT(x, y)
1262306a36Sopenharmony_ci#define _ASM_EXTABLE(x, y)
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#include "../../arch/x86/lib/memcpy_64.S"
1562306a36Sopenharmony_ci/*
1662306a36Sopenharmony_ci * We need to provide note.GNU-stack section, saying that we want
1762306a36Sopenharmony_ci * NOT executable stack. Otherwise the final linking will assume that
1862306a36Sopenharmony_ci * the ELF stack should not be restricted at all and set it RWX.
1962306a36Sopenharmony_ci */
2062306a36Sopenharmony_ci.section .note.GNU-stack,"",@progbits
21