]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
x86_64: Fix build with --disable-multiarch (BZ 30721)
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 8 Aug 2023 12:27:54 +0000 (09:27 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 10 Aug 2023 13:29:29 +0000 (10:29 -0300)
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>
sysdeps/x86_64/memcpy.S
sysdeps/x86_64/memmove.S
sysdeps/x86_64/memset.S

index d98500a78a3706b71b8710209562750f31b9e1fb..4922cba6576b67128382e24ae43e77d8504c50b0 100644 (file)
@@ -1 +1 @@
-/* Implemented in memcpy.S.  */
+/* Implemented in memmove.S.  */
index f0b84e3b520466ba435cd45222c10cf0915dc013..c3c08165e12a466ad585e85bcb6328923f639573 100644 (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)
index 7c99df36db2a0c6fd067bd784f6fb15252833746..c6df24e8de6a9faa22b836a860c032a259127c94 100644 (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)