[CRIU] [PATCH 3/4] arm64: provide own memcpy for pie
Christopher Covington
cov at codeaurora.org
Wed Nov 9 11:28:34 PST 2016
On 11/04/2016 02:25 AM, Kir Kolyshkin wrote:
> Got the following error trying to compile this with clang-3.6 on arm64:
>
>> GEN criu/pie/restorer.built-in.bin.o
>> criu/pie/native.lib.a(parasite-vdso.o): In function `vdso_proxify':
>> /criu/criu/pie/parasite-vdso.c:132: undefined reference to `memcpy'
>
> This happens because clang emits a call to memcpy for struct
> initialization (specifically, struct vdso_symtable in vdso_proxify()).
>
> See commit 214e280 ("pie: provide own memcpy for x86") for more
> background info about the issue.
>
> Cc: Christopher Covington <cov at codeaurora.org>
> Cc: Dmitry Safonov <dsafonov at virtuozzo.com>
> Signed-off-by: Kir Kolyshkin <kir at openvz.org>
> ---
> criu/arch/aarch64/copy_template.S | 193 +++++++++++++++++++++++++++++++++
> criu/arch/aarch64/include/asm/string.h | 14 +++
> criu/arch/aarch64/memcpy.S | 82 ++++++++++++++
> criu/pie/Makefile.library | 3 +
> 4 files changed, 292 insertions(+)
> create mode 100644 criu/arch/aarch64/copy_template.S
> create mode 100644 criu/arch/aarch64/memcpy.S
>
> diff --git a/criu/arch/aarch64/copy_template.S b/criu/arch/aarch64/copy_template.S
> new file mode 100644
> index 0000000..410fbdb
> --- /dev/null
> +++ b/criu/arch/aarch64/copy_template.S
> @@ -0,0 +1,193 @@
> +/*
> + * Copyright (C) 2013 ARM Ltd.
> + * Copyright (C) 2013 Linaro.
> + *
> + * This code is based on glibc cortex strings work originally authored by Linaro
> + * and re-licensed under GPLv2 for the Linux kernel. The original code can
> + * be found @
> + *
> + * http://bazaar.launchpad.net/~linaro-toolchain-dev/cortex-strings/trunk/
> + * files/head:/src/aarch64/
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program. If not, see <http://www.gnu.org/licenses/>.
> + */
Looks like this came from the kernel. I think the upstream cortex-strings
project has newer and better implementations than what is currently in the
kernel.
Regards,
Cov
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code
Aurora Forum, a Linux Foundation Collaborative Project.
More information about the CRIU
mailing list