aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-01-22 10:42:19 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-01-23 10:22:59 -0300
commit77c6a2717de1b6a78e79538b2074579ed77839ed (patch)
treea5b9ef5c1494f6d347d79b158ef5e78305c8bbe5
parentdfa3394a605c8f6f25e4f827789bc89eca1d206c (diff)
downloadglibc-77c6a2717de1b6a78e79538b2074579ed77839ed.zip
glibc-77c6a2717de1b6a78e79538b2074579ed77839ed.tar.gz
glibc-77c6a2717de1b6a78e79538b2074579ed77839ed.tar.bz2
string: Disable stack protector for memset in early static initialization
For ports that use the default memset, the compiler might generate early calls before the stack protector is initialized (for instance, riscv with -fstack-protector-all on _dl_aux_init). Checked on riscv64-linux-gnu-rv64imafdc-lp64d. Reviewed-by: Florian Weimer <fweimer@redhat.com>
-rw-r--r--string/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/string/Makefile b/string/Makefile
index 3ba77e1..8f31fa4 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -270,6 +270,7 @@ CFLAGS-memcpy.c += $(no-stack-protector)
CFLAGS-wordcopy.c += $(no-stack-protector)
# Called during static initialization
CFLAGS-strncmp.c += $(no-stack-protector)
+CFLAGS-memset.c += $(no-stack-protector)
CFLAGS-argz-next.c += $(config-cflags-wno-ignored-attributes)
CFLAGS-basename.c += $(config-cflags-wno-ignored-attributes)