This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] hppa: Check PIC instead of SHARED in start.S
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 29 Sep 2017 14:31:19 -0700
- Subject: [PATCH] hppa: Check PIC instead of SHARED in start.S
- Authentication-results: sourceware.org; auth=none
Since start.o may be compiled as PIC, we should check PIC instead of
SHARED.
OK for master?
* sysdeps/hppa/start.S (_start): Check PIC instead of SHARED.
---
sysdeps/hppa/start.S | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sysdeps/hppa/start.S b/sysdeps/hppa/start.S
index 5db1ba960b..c7f59724ba 100644
--- a/sysdeps/hppa/start.S
+++ b/sysdeps/hppa/start.S
@@ -42,7 +42,7 @@
/* Have the linker create plabel words so we get PLABEL32
relocs and not 21/14. The use of 21/14 relocs is only
supported in the latest dynamic linker. */
-#ifdef SHARED
+#ifdef PIC
.section .data.rel.ro,"aw",@progbits
#else
.section .rodata,"a",@progbits
@@ -56,7 +56,7 @@
.word P%__libc_csu_fini
.Lp__libc_csu_init:
.word P%__libc_csu_init
-#ifdef SHARED
+#ifdef PIC
.Lp__global:
.word $global$
#endif
@@ -101,7 +101,7 @@ _start:
stw %r23, -56(%sp)
/* Need to setup 1, 4, 5, and 7th arguments */
-#ifdef SHARED
+#ifdef PIC
/* load main (1st argument) */
addil LT'.Lpmain, %r19
ldw RT'.Lpmain(%r1), %r26
@@ -130,7 +130,7 @@ _start:
/* void *stack_end (7th argument) */
stw %sp, -60(%sp)
-#ifdef SHARED
+#ifdef PIC
/* load global */
addil LT'.Lp__global, %r19
ldw RT'.Lp__global(%r1), %dp
--
2.13.6