about summary refs log tree commit diff
path: root/sysdeps/i386/i586/memcpy.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-09-15 22:24:03 +0000
committerUlrich Drepper <drepper@redhat.com>2007-09-15 22:24:03 +0000
commit9bdfff60008403ff693ccc71da5957a4e57bfc25 (patch)
treecb7de7f1f3466c4ecd822ac3dc8e59b9fbff7d38 /sysdeps/i386/i586/memcpy.S
parentab905672b7afba3f862ca6b84921b497269b26ab (diff)
downloadglibc-9bdfff60008403ff693ccc71da5957a4e57bfc25.tar.gz
glibc-9bdfff60008403ff693ccc71da5957a4e57bfc25.tar.xz
glibc-9bdfff60008403ff693ccc71da5957a4e57bfc25.zip
* sysdeps/i386/i586/memcpy.S (__memcpy_chk): New definition.
	* sysdeps/i386/i586/mempcpy.S (__memcpy_chk): New definition.
	* sysdeps/i386/i586/memset.S (__memset_chk): New definition.
Diffstat (limited to 'sysdeps/i386/i586/memcpy.S')
-rw-r--r--sysdeps/i386/i586/memcpy.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/i386/i586/memcpy.S b/sysdeps/i386/i586/memcpy.S
index 6ab457fc55..677a7e6204 100644
--- a/sysdeps/i386/i586/memcpy.S
+++ b/sysdeps/i386/i586/memcpy.S
@@ -35,6 +35,13 @@
 #define LEN	SRC+PTR_SIZE
 
         .text
+#if defined PIC && !defined NOT_IN_libc
+ENTRY (__memcpy_chk)
+	movl	12(%esp), %eax
+	cmpl	%eax, 16(%esp)
+	jb	HIDDEN_JUMPTARGET (__chk_fail)
+END (__memcpy_chk)
+#endif
 ENTRY (BP_SYM (memcpy))
 	ENTER