]> sourceware.org Git - glibc.git/commitdiff
sysdeps/{i386, x86_64}/mempcpy_chk.S: fix linknamespace for __mempcpy_chk
authorFrederic Berat <fberat@redhat.com>
Tue, 20 Jun 2023 18:18:52 +0000 (20:18 +0200)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 22 Jun 2023 04:20:52 +0000 (00:20 -0400)
On i386 and x86_64, for libc.a specifically, __mempcpy_chk calls
mempcpy which leads POSIX routines to call non-POSIX mempcpy indirectly.

This leads the linknamespace test to fail when glibc is built with
__FORTIFY_SOURCE=3.

Since calling mempcpy doesn't bring any benefit for libc.a, directly
call __mempcpy instead.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
sysdeps/i386/mempcpy_chk.S
sysdeps/x86_64/mempcpy_chk.S

index 8b785bd9a5d804058759ab50d3be446e67fcd447..1e9bf71bfb4fa0b45008fa8a8116f65a430a62ed 100644 (file)
@@ -28,6 +28,6 @@ ENTRY (__mempcpy_chk)
        movl    12(%esp), %eax
        cmpl    %eax, 16(%esp)
        jb      __chk_fail
-       jmp     mempcpy
+       jmp     __mempcpy
 END (__mempcpy_chk)
 #endif
index b1ddb02f7895e8d206210a5eacdaf73273dfcd3a..b60ee4ff082aafb00339ed7f590ddc6872204495 100644 (file)
@@ -28,6 +28,6 @@
 ENTRY (__mempcpy_chk)
        cmpq    %rdx, %rcx
        jb      __chk_fail
-       jmp     mempcpy
+       jmp     __mempcpy
 END (__mempcpy_chk)
 #endif
This page took 0.043423 seconds and 5 git commands to generate.