diff mbox series

i386: Don't define stpncpy alias when used in IFUNC [BZ #31768]

Message ID 20240521003214.683261-1-hjl.tools@gmail.com
State New
Headers show
Series i386: Don't define stpncpy alias when used in IFUNC [BZ #31768] | expand

Commit Message

H.J. Lu May 21, 2024, 12:32 a.m. UTC
Fix BZ #31768 by not defining stpncpy alias when used in IFUNC.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
 sysdeps/i386/stpncpy.S | 2 ++
 1 file changed, 2 insertions(+)

Comments

Sunil Pandey May 21, 2024, 1:39 a.m. UTC | #1
On Mon, May 20, 2024 at 5:32 PM H.J. Lu <hjl.tools@gmail.com> wrote:

> Fix BZ #31768 by not defining stpncpy alias when used in IFUNC.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> ---
>  sysdeps/i386/stpncpy.S | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/sysdeps/i386/stpncpy.S b/sysdeps/i386/stpncpy.S
> index 895fee8a1e..74130bc71d 100644
> --- a/sysdeps/i386/stpncpy.S
> +++ b/sysdeps/i386/stpncpy.S
> @@ -139,4 +139,6 @@ L(9):       popl %esi               /* restore saved
> register content */
>  END (__stpncpy)
>
>  libc_hidden_def (__stpncpy)
> +#ifndef __stpncpy
>  weak_alias (__stpncpy, stpncpy)
> +#endif
> --
> 2.45.1
>

LGTM
Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>

--Sunil
diff mbox series

Patch

diff --git a/sysdeps/i386/stpncpy.S b/sysdeps/i386/stpncpy.S
index 895fee8a1e..74130bc71d 100644
--- a/sysdeps/i386/stpncpy.S
+++ b/sysdeps/i386/stpncpy.S
@@ -139,4 +139,6 @@  L(9):	popl %esi		/* restore saved register content */
 END (__stpncpy)
 
 libc_hidden_def (__stpncpy)
+#ifndef __stpncpy
 weak_alias (__stpncpy, stpncpy)
+#endif