[PATCH] memset: fix define usage for shared libs

Mike Frysinger vapier@gentoo.org
Thu Apr 5 01:26:00 GMT 2012


The proper define to check "am I in a shared lib" is "SHARED", not "PIC".
The two new memset_chk functions incorrectly depend on "PIC".

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

2011-02-22  Mike Frysinger  <vapier@gentoo.org>

	* sysdeps/i386/i686/memset_chk.S: Change PIC to SHARED.
	* sysdeps/x86_64/memset_chk.S: Likewise.
---
note: this was posted previously, but went nowhere, so posting again

 sysdeps/i386/i686/memset_chk.S |    2 +-
 sysdeps/x86_64/memset_chk.S    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sysdeps/i386/i686/memset_chk.S b/sysdeps/i386/i686/memset_chk.S
index 504fc06..f2e7fd7 100644
--- a/sysdeps/i386/i686/memset_chk.S
+++ b/sysdeps/i386/i686/memset_chk.S
@@ -19,7 +19,7 @@
 #include <sysdep.h>
 #include "asm-syntax.h"
 
-#ifndef PIC
+#ifndef SHARED
 	/* For libc.so this is defined in memset.S.
 	   For libc.a, this is a separate source to avoid
 	   memset bringing in __chk_fail and all routines
diff --git a/sysdeps/x86_64/memset_chk.S b/sysdeps/x86_64/memset_chk.S
index 16f1fde..9efb3d9 100644
--- a/sysdeps/x86_64/memset_chk.S
+++ b/sysdeps/x86_64/memset_chk.S
@@ -19,7 +19,7 @@
 #include <sysdep.h>
 #include "asm-syntax.h"
 
-#ifndef PIC
+#ifndef SHARED
 	/* For libc.so this is defined in memset.S.
 	   For libc.a, this is a separate source to avoid
 	   memset bringing in __chk_fail and all routines
-- 
1.7.8.5



More information about the Libc-alpha mailing list