]> sourceware.org Git - glibc.git/commitdiff
i686: Fix build with --disable-multiarch
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 8 Aug 2023 12:27:55 +0000 (09:27 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 10 Aug 2023 13:29:29 +0000 (10:29 -0300)
Since i686 provides the fortified wrappers for memcpy, mempcpy,
memmove, and memset on the same string implementation, the static
build tries to optimized it by not tying the fortified wrappers
to string routine (to avoid pulling the fortify function if
they are not required).

Checked on i686-linux-gnu building with different option:
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.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
sysdeps/i386/i686/memcpy.S
sysdeps/i386/i686/mempcpy.S
sysdeps/i386/i686/multiarch/memcpy_chk.c
sysdeps/i386/i686/multiarch/memmove_chk.c
sysdeps/i386/i686/multiarch/mempcpy_chk.c
sysdeps/i386/i686/multiarch/memset_chk.c

index 9b48ec0ea15585d828abe97e5bf39219e3e2e8c8..b86af4aac9995d7f8220690717f5b2661f631212 100644 (file)
@@ -27,7 +27,7 @@
 #define LEN    SRC+4
 
        .text
-#if defined PIC && IS_IN (libc)
+#if defined SHARED && IS_IN (libc)
 ENTRY_CHK (__memcpy_chk)
        movl    12(%esp), %eax
        cmpl    %eax, 16(%esp)
index 26f8501e7dcde6cad5435e32b27a861270376fc9..14d9dd681a0e88dd60679474a3a7c85f0002daa3 100644 (file)
@@ -27,7 +27,7 @@
 #define LEN    SRC+4
 
        .text
-#if defined PIC && IS_IN (libc)
+#if defined SHARED && IS_IN (libc)
 ENTRY_CHK (__mempcpy_chk)
        movl    12(%esp), %eax
        cmpl    %eax, 16(%esp)
index ec945dc91f3e38255b3592af5ff6154d39bdeae1..c3a8aeaf184bb8efa5b050caf4921c3ecc69b1ce 100644 (file)
@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_memcpy_chk, __memcpy_chk,
 __hidden_ver1 (__memcpy_chk, __GI___memcpy_chk, __redirect_memcpy_chk)
   __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memcpy_chk);
 # endif
+#else
+# include <debug/memcpy_chk.c>
 #endif
index 55c7601d5d5baa070fba64f2e5d6c20013b79134..070dde083a563564db998e8b005946565cbf9685 100644 (file)
@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_memmove_chk, __memmove_chk,
 __hidden_ver1 (__memmove_chk, __GI___memmove_chk, __redirect_memmove_chk)
   __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memmove_chk);
 # endif
+#else
+# include <debug/memmove_chk.c>
 #endif
index 83569cf9d9c6471310e2528c06170d4ba4c6c9a3..14360f1828406eb86d1ca8f7cbff0ef3eb1c2bb4 100644 (file)
@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_mempcpy_chk, __mempcpy_chk,
 __hidden_ver1 (__mempcpy_chk, __GI___mempcpy_chk, __redirect_mempcpy_chk)
   __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__mempcpy_chk);
 # endif
+#else
+# include <debug/mempcpy_chk.c>
 #endif
index 1a7503858d9394cfa7649ef063689433bd38faad..8179ef7c0bf7524b4a005ac5f1627834c23f9846 100644 (file)
@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_memset_chk, __memset_chk,
 __hidden_ver1 (__memset_chk, __GI___memset_chk, __redirect_memset_chk)
   __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memset_chk);
 # endif
+#else
+# include <debug/memset_chk.c>
 #endif
This page took 0.049081 seconds and 5 git commands to generate.