This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] memset: fix define usage for shared libs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]