public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andreas Schwab <schwab@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] i386: make debug wrappers compatible with static PIE
Date: Wed, 12 Jul 2023 12:38:48 +0000 (GMT)	[thread overview]
Message-ID: <20230712123848.802203858D20@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ca230f5833d699a35778f83b3ab646ba37f6f66c

commit ca230f5833d699a35778f83b3ab646ba37f6f66c
Author: Andreas Schwab <schwab@suse.de>
Date:   Wed Jul 12 11:29:34 2023 +0200

    i386: make debug wrappers compatible with static PIE
    
    Static PIE requires the use of PLT relocation.

Diff:
---
 sysdeps/i386/memcpy_chk.S  | 4 ++--
 sysdeps/i386/memmove_chk.S | 4 ++--
 sysdeps/i386/mempcpy_chk.S | 4 ++--
 sysdeps/i386/memset_chk.S  | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/sysdeps/i386/memcpy_chk.S b/sysdeps/i386/memcpy_chk.S
index 7b12c12aba..1676de4fff 100644
--- a/sysdeps/i386/memcpy_chk.S
+++ b/sysdeps/i386/memcpy_chk.S
@@ -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
diff --git a/sysdeps/i386/memmove_chk.S b/sysdeps/i386/memmove_chk.S
index 604aea8305..785b27373b 100644
--- a/sysdeps/i386/memmove_chk.S
+++ b/sysdeps/i386/memmove_chk.S
@@ -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
diff --git a/sysdeps/i386/mempcpy_chk.S b/sysdeps/i386/mempcpy_chk.S
index 276eab1e8a..f58ca96e16 100644
--- a/sysdeps/i386/mempcpy_chk.S
+++ b/sysdeps/i386/mempcpy_chk.S
@@ -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
diff --git a/sysdeps/i386/memset_chk.S b/sysdeps/i386/memset_chk.S
index a2e9208e1c..9901ca6d52 100644
--- a/sysdeps/i386/memset_chk.S
+++ b/sysdeps/i386/memset_chk.S
@@ -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

                 reply	other threads:[~2023-07-12 12:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230712123848.802203858D20@sourceware.org \
    --to=schwab@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).