]>
Commit | Line | Data |
---|---|---|
b9215da1 MT |
1 | From 6135d50e44233d8c89ca788f78c669941ad09fb9 Mon Sep 17 00:00:00 2001 |
2 | From: Adhemerval Zanella <adhemerval.zanella@linaro.org> | |
3 | Date: Tue, 8 Aug 2023 09:27:54 -0300 | |
4 | Subject: [PATCH 05/27] x86_64: Fix build with --disable-multiarch (BZ 30721) | |
5 | ||
6 | With multiarch disabled, the default memmove implementation provides | |
7 | the fortify routines for memcpy, mempcpy, and memmove. However, it | |
8 | does not provide the internal hidden definitions used when building | |
9 | with fortify enabled. The memset has a similar issue. | |
10 | ||
11 | Checked on x86_64-linux-gnu building with different options: | |
12 | default and --disable-multi-arch plus default, --disable-default-pie, | |
13 | --enable-fortify-source={2,3}, and --enable-fortify-source={2,3} | |
14 | with --disable-default-pie. | |
15 | Tested-by: Andreas K. Huettel <dilfridge@gentoo.org> | |
16 | Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org> | |
17 | ||
18 | (cherry picked from commit 51cb52214fcd72849c640b12f5099ed3ac776181) | |
19 | --- | |
20 | sysdeps/x86_64/memcpy.S | 2 +- | |
21 | sysdeps/x86_64/memmove.S | 3 +++ | |
22 | sysdeps/x86_64/memset.S | 1 + | |
23 | 3 files changed, 5 insertions(+), 1 deletion(-) | |
24 | ||
25 | diff --git a/sysdeps/x86_64/memcpy.S b/sysdeps/x86_64/memcpy.S | |
26 | index d98500a78a..4922cba657 100644 | |
27 | --- a/sysdeps/x86_64/memcpy.S | |
28 | +++ b/sysdeps/x86_64/memcpy.S | |
29 | @@ -1 +1 @@ | |
30 | -/* Implemented in memcpy.S. */ | |
31 | +/* Implemented in memmove.S. */ | |
32 | diff --git a/sysdeps/x86_64/memmove.S b/sysdeps/x86_64/memmove.S | |
33 | index f0b84e3b52..c3c08165e1 100644 | |
34 | --- a/sysdeps/x86_64/memmove.S | |
35 | +++ b/sysdeps/x86_64/memmove.S | |
36 | @@ -46,6 +46,9 @@ weak_alias (__mempcpy, mempcpy) | |
37 | ||
38 | #ifndef USE_MULTIARCH | |
39 | libc_hidden_builtin_def (memmove) | |
40 | +libc_hidden_builtin_def (__memmove_chk) | |
41 | +libc_hidden_builtin_def (__memcpy_chk) | |
42 | +libc_hidden_builtin_def (__mempcpy_chk) | |
43 | # if defined SHARED && IS_IN (libc) | |
44 | strong_alias (memmove, __memcpy) | |
45 | libc_hidden_ver (memmove, memcpy) | |
46 | diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S | |
47 | index 7c99df36db..c6df24e8de 100644 | |
48 | --- a/sysdeps/x86_64/memset.S | |
49 | +++ b/sysdeps/x86_64/memset.S | |
50 | @@ -32,6 +32,7 @@ | |
51 | #include "isa-default-impl.h" | |
52 | ||
53 | libc_hidden_builtin_def (memset) | |
54 | +libc_hidden_builtin_def (__memset_chk) | |
55 | ||
56 | #if IS_IN (libc) | |
57 | libc_hidden_def (__wmemset) | |
58 | -- | |
59 | 2.39.2 | |
60 |