diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-01-10 18:00:55 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-06 16:19:35 -0300 |
commit | 0f4254311ebf15b8f3f6f66182e8dd5151a58a88 (patch) | |
tree | 9a03470d7c7ec394b35cecaf2e1b57a7e8dc08cc /sysdeps/i386 | |
parent | 2a8867a17ffe5c5a4251fd40bf6c73a3fd426062 (diff) | |
download | glibc-0f4254311ebf15b8f3f6f66182e8dd5151a58a88.zip glibc-0f4254311ebf15b8f3f6f66182e8dd5151a58a88.tar.gz glibc-0f4254311ebf15b8f3f6f66182e8dd5151a58a88.tar.bz2 |
string: Improve generic strnlen with memchr
It also cleanups the multiple inclusion by leaving the ifunc
implementation to undef the weak_alias and libc_hidden_def.
Co-authored-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
Diffstat (limited to 'sysdeps/i386')
-rw-r--r-- | sysdeps/i386/i686/multiarch/strnlen-c.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/i386/i686/multiarch/strnlen-c.c b/sysdeps/i386/i686/multiarch/strnlen-c.c index 351e939..beb0350 100644 --- a/sysdeps/i386/i686/multiarch/strnlen-c.c +++ b/sysdeps/i386/i686/multiarch/strnlen-c.c @@ -1,10 +1,10 @@ #define STRNLEN __strnlen_ia32 +#include <string/strnlen.c> + #ifdef SHARED -# undef libc_hidden_def -# define libc_hidden_def(name) \ - __hidden_ver1 (__strnlen_ia32, __GI_strnlen, __strnlen_ia32); \ - strong_alias (__strnlen_ia32, __strnlen_ia32_1); \ - __hidden_ver1 (__strnlen_ia32_1, __GI___strnlen, __strnlen_ia32_1); +/* Alias for internal symbol to avoid PLT generation, it redirects the + libc_hidden_def (__strnlen/strlen) to default implementation. */ +__hidden_ver1 (__strnlen_ia32, __GI_strnlen, __strnlen_ia32); +strong_alias (__strnlen_ia32, __strnlen_ia32_1); +__hidden_ver1 (__strnlen_ia32_1, __GI___strnlen, __strnlen_ia32_1); #endif - -#include "string/strnlen.c" |