This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] x86-64: Check PIC instead of SHARED in start.S
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 2 Aug 2017 09:00:05 -0700
- Subject: [PATCH] x86-64: Check PIC instead of SHARED in start.S
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Since start.o may be compiled as PIC, we should check PIC instead of
SHARED.
Any comments or objections?
H.J.
--
* sysdeps/x86_64/start.S (_start): Check PIC instead of SHARED.
---
sysdeps/x86_64/start.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/x86_64/start.S b/sysdeps/x86_64/start.S
index 62a00eaeaa..9edd17b60c 100644
--- a/sysdeps/x86_64/start.S
+++ b/sysdeps/x86_64/start.S
@@ -96,7 +96,7 @@ ENTRY (_start)
which grow downwards). */
pushq %rsp
-#ifdef SHARED
+#ifdef PIC
/* Pass address of our own entry points to .fini and .init. */
mov __libc_csu_fini@GOTPCREL(%rip), %R8_LP
mov __libc_csu_init@GOTPCREL(%rip), %RCX_LP
--
2.13.3