i386: make debug wrappers compatible with static PIE
authorAndreas Schwab <schwab@suse.de>
Wed, 12 Jul 2023 09:29:34 +0000 (11:29 +0200)
committerAndreas Schwab <schwab@suse.de>
Wed, 12 Jul 2023 12:38:13 +0000 (14:38 +0200)
Static PIE requires the use of PLT relocation.

sysdeps/i386/memcpy_chk.S
sysdeps/i386/memmove_chk.S
sysdeps/i386/mempcpy_chk.S
sysdeps/i386/memset_chk.S

index 7b12c12aba56fd5cf6c1f82b29896210148cec28..1676de4fff5625e1b7959d24897242993bcfec7f 100644 (file)
@@ -28,8 +28,8 @@
 ENTRY (__memcpy_chk)
        movl    12(%esp), %eax
        cmpl    %eax, 16(%esp)
-       jb      __chk_fail
-       jmp     memcpy
+       jb      HIDDEN_JUMPTARGET (__chk_fail)
+       jmp     JUMPTARGET (memcpy)
 END (__memcpy_chk)
 libc_hidden_builtin_def (__memcpy_chk)
 #endif
index 604aea83057af6587bf39556210597e149d75431..785b27373b2fb1063a51b512d77df2f207ac1a35 100644 (file)
@@ -27,8 +27,8 @@
 ENTRY (__memmove_chk)
        movl    12(%esp), %eax
        cmpl    %eax, 16(%esp)
-       jb      __chk_fail
-       jmp     memmove
+       jb      HIDDEN_JUMPTARGET (__chk_fail)
+       jmp     JUMPTARGET (memmove)
 END (__memmove_chk)
 libc_hidden_builtin_def (MEMMOVE_CHK)
 #endif
index 276eab1e8a3b0566a06f417020a445f59f9086b9..f58ca96e169449f45a69467e167377de6beaaa5b 100644 (file)
@@ -27,8 +27,8 @@
 ENTRY (__mempcpy_chk)
        movl    12(%esp), %eax
        cmpl    %eax, 16(%esp)
-       jb      __chk_fail
-       jmp     __mempcpy
+       jb      HIDDEN_JUMPTARGET (__chk_fail)
+       jmp     HIDDEN_JUMPTARGET (__mempcpy)
 END (__mempcpy_chk)
 libc_hidden_builtin_def (__mempcpy_chk)
 #endif
index a2e9208e1c34ae97310ac0739b065e7e4687b9f6..9901ca6d525e6e0b25da22cc4c496b7048a40086 100644 (file)
@@ -27,8 +27,8 @@
 ENTRY (__memset_chk)
        movl    12(%esp), %eax
        cmpl    %eax, 16(%esp)
-       jb      __chk_fail
-       jmp     memset
+       jb      HIDDEN_JUMPTARGET (__chk_fail)
+       jmp     JUMPTARGET (memset)
 END (__memset_chk)
 libc_hidden_builtin_def (__memset_chk)
 #endif