diff mbox series

aarch64: Remove duplicate memchr/strlen in libc.a (BZ 31777)

Message ID 20240522131330.492245-1-adhemerval.zanella@linaro.org
State Accepted
Commit ef9596352b9863dd055578b4bfdd3777aca0bcb8
Headers show
Series aarch64: Remove duplicate memchr/strlen in libc.a (BZ 31777) | expand

Commit Message

Adhemerval Zanella Netto May 22, 2024, 1:13 p.m. UTC
The generic version provides weak definitions of memchr/strlen,
which are already provided by the ifunc resolvers.
---
 sysdeps/aarch64/multiarch/memchr_generic.S | 3 +++
 sysdeps/aarch64/multiarch/strlen_generic.S | 3 +++
 2 files changed, 6 insertions(+)

Comments

H.J. Lu May 22, 2024, 1:17 p.m. UTC | #1
On Wed, May 22, 2024 at 6:13 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> The generic version provides weak definitions of memchr/strlen,
> which are already provided by the ifunc resolvers.
> ---
>  sysdeps/aarch64/multiarch/memchr_generic.S | 3 +++
>  sysdeps/aarch64/multiarch/strlen_generic.S | 3 +++
>  2 files changed, 6 insertions(+)
>
> diff --git a/sysdeps/aarch64/multiarch/memchr_generic.S b/sysdeps/aarch64/multiarch/memchr_generic.S
> index 0ed5811745..8d554275ba 100644
> --- a/sysdeps/aarch64/multiarch/memchr_generic.S
> +++ b/sysdeps/aarch64/multiarch/memchr_generic.S
> @@ -24,6 +24,9 @@
>  # undef libc_hidden_builtin_def
>  # define libc_hidden_builtin_def(name)
>
> +# undef weak_alias
> +# define weak_alias(a, b)
> +
>  /* Add a hidden definition for use within libc.so.  */
>  # ifdef SHARED
>         .globl __GI_memchr; __GI_memchr = __memchr_generic
> diff --git a/sysdeps/aarch64/multiarch/strlen_generic.S b/sysdeps/aarch64/multiarch/strlen_generic.S
> index f980a9a68f..ceeafe920c 100644
> --- a/sysdeps/aarch64/multiarch/strlen_generic.S
> +++ b/sysdeps/aarch64/multiarch/strlen_generic.S
> @@ -30,6 +30,9 @@
>  # undef libc_hidden_builtin_def
>  # define libc_hidden_builtin_def(name)
>
> +# undef weak_alias
> +# define weak_alias(a, b)
> +
>  # ifdef SHARED
>  /* It doesn't make sense to send libc-internal strlen calls through a PLT. */
>         .globl __GI_strlen; __GI_strlen = __strlen_generic
> --
> 2.43.0
>

LGTM.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Thanks.
diff mbox series

Patch

diff --git a/sysdeps/aarch64/multiarch/memchr_generic.S b/sysdeps/aarch64/multiarch/memchr_generic.S
index 0ed5811745..8d554275ba 100644
--- a/sysdeps/aarch64/multiarch/memchr_generic.S
+++ b/sysdeps/aarch64/multiarch/memchr_generic.S
@@ -24,6 +24,9 @@ 
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(name)
 
+# undef weak_alias
+# define weak_alias(a, b)
+
 /* Add a hidden definition for use within libc.so.  */
 # ifdef SHARED
 	.globl __GI_memchr; __GI_memchr = __memchr_generic
diff --git a/sysdeps/aarch64/multiarch/strlen_generic.S b/sysdeps/aarch64/multiarch/strlen_generic.S
index f980a9a68f..ceeafe920c 100644
--- a/sysdeps/aarch64/multiarch/strlen_generic.S
+++ b/sysdeps/aarch64/multiarch/strlen_generic.S
@@ -30,6 +30,9 @@ 
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(name)
 
+# undef weak_alias
+# define weak_alias(a, b)
+
 # ifdef SHARED
 /* It doesn't make sense to send libc-internal strlen calls through a PLT. */
 	.globl __GI_strlen; __GI_strlen = __strlen_generic