This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] memset: fix define usage for shared libs
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-alpha at sourceware dot org
- Date: Wed, 4 Apr 2012 21:26:02 -0400
- Subject: [PATCH] memset: fix define usage for shared libs
- References: <1298399284-1537-1-git-send-email-vapier@gentoo.org>
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