From 9849c407e8e6732fbf417cb447937e3b3b9a54ec Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Wed, 16 Dec 2009 09:09:38 +0100 Subject: build: Get rids of PIC macro using compiler flag __PIC__ instead Based on Peter Mazinger's comments on a recent commit, I decided to get rids of all occurrences of PIC changing them to __PIC__ Signed-off-by: Carmelo Amoroso --- libc/string/x86_64/memcpy.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/string/x86_64/memcpy.S') diff --git a/libc/string/x86_64/memcpy.S b/libc/string/x86_64/memcpy.S index 697b992d0..011291447 100644 --- a/libc/string/x86_64/memcpy.S +++ b/libc/string/x86_64/memcpy.S @@ -26,7 +26,7 @@ #define MEMPCPY_P (defined memcpy) .text -#if defined PIC && !defined NOT_IN_libc +#if defined __PIC__ && !defined NOT_IN_libc ENTRY (__memcpy_chk) cmpq %rdx, %rcx jb HIDDEN_JUMPTARGET (__chk_fail) -- cgit v1.2.3 From 7dcd83e8bded560b6a2c658889995390d3021a92 Mon Sep 17 00:00:00 2001 From: Austin Foxley Date: Sat, 19 Dec 2009 13:35:52 -0800 Subject: x86_64: fix multiple definition of chk functions also enable __chk_fail and only try to call it when SSP is on Signed-off-by: Austin Foxley --- libc/string/x86_64/memcpy.S | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libc/string/x86_64/memcpy.S') diff --git a/libc/string/x86_64/memcpy.S b/libc/string/x86_64/memcpy.S index 011291447..6d941e0f2 100644 --- a/libc/string/x86_64/memcpy.S +++ b/libc/string/x86_64/memcpy.S @@ -29,7 +29,9 @@ #if defined __PIC__ && !defined NOT_IN_libc ENTRY (__memcpy_chk) cmpq %rdx, %rcx +#if defined __UCLIBC_HAS_SSP__ jb HIDDEN_JUMPTARGET (__chk_fail) +#endif END (__memcpy_chk) #endif ENTRY (BP_SYM (memcpy)) -- cgit v1.2.3