diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-01-22 10:42:19 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-01-23 10:22:59 -0300 |
commit | 77c6a2717de1b6a78e79538b2074579ed77839ed (patch) | |
tree | a5b9ef5c1494f6d347d79b158ef5e78305c8bbe5 | |
parent | dfa3394a605c8f6f25e4f827789bc89eca1d206c (diff) | |
download | glibc-77c6a2717de1b6a78e79538b2074579ed77839ed.tar glibc-77c6a2717de1b6a78e79538b2074579ed77839ed.tar.gz glibc-77c6a2717de1b6a78e79538b2074579ed77839ed.tar.bz2 glibc-77c6a2717de1b6a78e79538b2074579ed77839ed.zip |
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/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/string/Makefile b/string/Makefile index 3ba77e1b2f..8f31fa49e6 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) |