x86_64: Fix build with --disable-multiarch (BZ 30721)

With multiarch disabled, the default memmove implementation provides
the fortify routines for memcpy, mempcpy, and memmove.  However, it
does not provide the internal hidden definitions used when building
with fortify enabled.  The memset has a similar issue.

Checked on x86_64-linux-gnu building with different options:
default and --disable-multi-arch plus default, --disable-default-pie,
--enable-fortify-source={2,3}, and --enable-fortify-source={2,3}
with --disable-default-pie.
Tested-by: Andreas K. Huettel <dilfridge@gentoo.org>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
Adhemerval Zanella 2023-08-08 09:27:54 -03:00
parent b163fca6c3
commit 51cb52214f
3 changed files with 5 additions and 1 deletions

View File

@ -1 +1 @@
/* Implemented in memcpy.S. */
/* Implemented in memmove.S. */

View File

@ -46,6 +46,9 @@ weak_alias (__mempcpy, mempcpy)
#ifndef USE_MULTIARCH
libc_hidden_builtin_def (memmove)
libc_hidden_builtin_def (__memmove_chk)
libc_hidden_builtin_def (__memcpy_chk)
libc_hidden_builtin_def (__mempcpy_chk)
# if defined SHARED && IS_IN (libc)
strong_alias (memmove, __memcpy)
libc_hidden_ver (memmove, memcpy)

View File

@ -32,6 +32,7 @@
#include "isa-default-impl.h"
libc_hidden_builtin_def (memset)
libc_hidden_builtin_def (__memset_chk)
#if IS_IN (libc)
libc_hidden_def (__wmemset)