[3/3] string: Disable stack protector in early static initialization

Message ID 20230207131255.3396143-4-adhemerval.zanella@linaro.org
State Committed
Commit fb95c316382679c0826cc8399760977cd95f15c9
Headers
Series Minor fixes from generic string routines |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit success Build for i686

Commit Message

Adhemerval Zanella Feb. 7, 2023, 1:12 p.m. UTC
  For powerpc, strncmp is used on _dl_string_platform issued by
__tcb_parse_hwcap_and_convert_at_platform.
---
 string/Makefile | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Carlos Seo Feb. 8, 2023, 5:27 p.m. UTC | #1
On Tue, 7 Feb 2023 at 10:14, Adhemerval Zanella via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> For powerpc, strncmp is used on _dl_string_platform issued by
> __tcb_parse_hwcap_and_convert_at_platform.
> ---

LGTM.
  
Carlos Seo Feb. 8, 2023, 7:53 p.m. UTC | #2
Reviewed-by: Carlos Eduardo Seo <carlos.seo@linaro.org>

On Wed, 8 Feb 2023 at 14:27, Carlos Seo <carlos.seo@linaro.org> wrote:
>
> On Tue, 7 Feb 2023 at 10:14, Adhemerval Zanella via Libc-alpha
> <libc-alpha@sourceware.org> wrote:
> >
> > For powerpc, strncmp is used on _dl_string_platform issued by
> > __tcb_parse_hwcap_and_convert_at_platform.
> > ---
>
> LGTM.
  

Patch

diff --git a/string/Makefile b/string/Makefile
index 3eced0d027..c84b49aaa5 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -230,6 +230,8 @@  LDFLAGS-tst-xbzero-opt = -z now
 # Called during TLS initialization.
 CFLAGS-memcpy.c += $(no-stack-protector)
 CFLAGS-wordcopy.c += $(no-stack-protector)
+# Called during static initialization
+CFLAGS-strncmp.c += $(no-stack-protector)
 
 CFLAGS-argz-next.c += $(config-cflags-wno-ignored-attributes)
 CFLAGS-basename.c += $(config-cflags-wno-ignored-attributes)