[0/3] Minor fixes from generic string routines

Message ID 20230207131255.3396143-1-adhemerval.zanella@linaro.org
Headers
Series Minor fixes from generic string routines |

Message

Adhemerval Zanella Netto Feb. 7, 2023, 1:12 p.m. UTC
  The improve generic string routines review brought up minor issues
with the internal hidden proto and def for strchrnul and memrchr.
Although it does not incur in intra-PLT generation, it would be good
to fix them for consistency.

The strcnmp fix is to guarantee that the generic implementation can
be used on static initialization (once the loader is realocated or
loader is initialized).  Ideally I think it would be better to
disable static protection on all string routines, but we can do
it one by one.

Adhemerval Zanella (3):
  string: Add libc_hidden_proto for strchrnul
  string: Add libc_hidden_proto for memrchr
  string: Disable stack protector in early static initialization

 include/string.h                               |  2 ++
 string/Makefile                                |  2 ++
 string/memrchr.c                               |  1 +
 string/strchrnul.c                             |  1 +
 sysdeps/aarch64/memrchr.S                      |  1 +
 sysdeps/aarch64/strchrnul.S                    |  1 +
 sysdeps/i386/i686/multiarch/memrchr-sse2.S     |  1 +
 sysdeps/i386/i686/multiarch/memrchr.c          |  2 ++
 sysdeps/i386/strchrnul.S                       |  1 +
 sysdeps/m68k/strchrnul.S                       |  1 +
 .../powerpc32/power4/multiarch/memrchr-ppc32.c | 10 ++++++++++
 .../powerpc32/power4/multiarch/memrchr.c       | 12 ++++++------
 .../power4/multiarch/strchrnul-ppc32.c         |  7 +++++++
 .../powerpc32/power4/multiarch/strchrnul.c     | 17 +++++++++--------
 sysdeps/powerpc/powerpc32/power7/memrchr.S     |  1 +
 sysdeps/powerpc/powerpc64/multiarch/memrchr.c  | 18 +++++++++---------
 .../powerpc/powerpc64/multiarch/strchrnul.c    |  1 +
 sysdeps/powerpc/powerpc64/power7/memrchr.S     |  1 +
 sysdeps/powerpc/powerpc64/power8/memrchr.S     |  1 +
 sysdeps/s390/memrchr-c.c                       |  4 ++++
 sysdeps/s390/memrchr.c                         |  8 +++++---
 sysdeps/s390/strchrnul-c.c                     |  4 +++-
 sysdeps/s390/strchrnul.c                       |  8 +++++---
 sysdeps/x86_64/memrchr.S                       |  1 +
 sysdeps/x86_64/multiarch/memrchr.c             |  1 +
 sysdeps/x86_64/multiarch/strchrnul.c           |  4 ++++
 sysdeps/x86_64/strchrnul.S                     |  1 +
 27 files changed, 82 insertions(+), 30 deletions(-)