about summary refs log tree commit diff
path: root/sysdeps/x86_64/memcpy.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64/memcpy.S')
-rw-r--r--sysdeps/x86_64/memcpy.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/x86_64/memcpy.S b/sysdeps/x86_64/memcpy.S
index de47688241..5f06198b5d 100644
--- a/sysdeps/x86_64/memcpy.S
+++ b/sysdeps/x86_64/memcpy.S
@@ -29,6 +29,12 @@
 #define MEMPCPY_P (defined memcpy)
 
         .text
+#if defined PIC && !defined NOT_IN_libc
+ENTRY (__memcpy_chk)
+	cmpq	%rdx, %rcx
+	jb	HIDDEN_JUMPTARGET (__chk_fail)
+END (__memcpy_chk)
+#endif
 ENTRY (BP_SYM (memcpy))
 	/* Cutoff for the big loop is a size of 32 bytes since otherwise
 	   the loop will never be entered.  */