tools/nolibc: x86_64: use local label in memcpy/memmove
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 12 Aug 2024 20:50:19 +0000 (22:50 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Fri, 16 Aug 2024 15:23:13 +0000 (17:23 +0200)
commit25fb329a23c78d59a055a7b1329d18f30a2be92d
tree880e4b11c2d6da2ba013e10de0c0f71038486f8e
parentff7b9abbfce985b92f71c855246508edb0980cd6
tools/nolibc: x86_64: use local label in memcpy/memmove

Compiling arch-x86_64.h with clang and binutils LD yields
duplicate label errors:

.../gcc-13.2.0-nolibc/x86_64-linux/bin/x86_64-linux-ld: error: LLVM gold plugin: <inline asm>:44:1: symbol '.Lbackward_copy' is already defined
.Lbackward_copy:leaq -1(%rdi, %rcx, 1), %rdi

Instead of a local symbol use a local label which can be defined
multiple times and therefore avoids the error.

Reviewed-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20240812-nolibc-lto-v2-3-736af7bbefa8@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/include/nolibc/arch-x86_64.h