This patch disables multiarch memcpy variants when !IS_IN(libc),
because rtld can only use a single fixed implementation.
Signed-off-by: Yao Zihong <zihong.plct@isrc.iscas.ac.cn>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
# define MEMCPY __memcpy_generic
# undef libc_hidden_builtin_def
# define libc_hidden_builtin_def(x)
+# include <string/memcpy.c>
#endif
-#include <string/memcpy.c>
#include <sysdep.h>
#include <sys/asm.h>
+#if IS_IN(libc)
/* memcpy optimization for CPUs with fast unaligned support
(RISCV_HWPROBE_MISALIGNED_FAST).
The tail is handled with branchless copies. */
-#define BLOCK_SIZE (16 * SZREG)
+# define BLOCK_SIZE (16 * SZREG)
.attribute unaligned_access, 1
ENTRY (__memcpy_noalignment)
mv a3, a5
j L(word_copy)
END (__memcpy_noalignment)
+
+#endif