public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sparc: Check PIC instead of SHARED in start.S
@ 2017-09-29 21:30 H.J. Lu
  2018-02-03 14:04 ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2017-09-29 21:30 UTC (permalink / raw)
  To: GNU C Library

Since start.o may be compiled as PIC, we should check PIC instead of
SHARED.

OK for master?

	* sysdeps/sparc/sparc32/start.S (_start): Check PIC instead of
	SHARED.
	* sysdeps/sparc/sparc64/start.S (_start): Likewise.
---
 sysdeps/sparc/sparc32/start.S | 4 ++--
 sysdeps/sparc/sparc64/start.S | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sysdeps/sparc/sparc32/start.S b/sysdeps/sparc/sparc32/start.S
index a06568d0e9..b882d1e61f 100644
--- a/sysdeps/sparc/sparc32/start.S
+++ b/sysdeps/sparc/sparc32/start.S
@@ -42,7 +42,7 @@
 	.global _start
 	.type _start,#function
 _start:
-#ifdef SHARED
+#ifdef PIC
 	SETUP_PIC_REG(l7)
 #endif
 
@@ -57,7 +57,7 @@ _start:
 	add	%sp, 23*4, %o2
 
   /* Load the addresses of the user entry points.  */
-#ifndef SHARED
+#ifndef PIC
 	sethi	%hi(main), %o0
 	sethi	%hi(__libc_csu_init), %o3
 	sethi	%hi(__libc_csu_fini), %o4
diff --git a/sysdeps/sparc/sparc64/start.S b/sysdeps/sparc/sparc64/start.S
index fcd4721463..21d16de804 100644
--- a/sysdeps/sparc/sparc64/start.S
+++ b/sysdeps/sparc/sparc64/start.S
@@ -42,7 +42,7 @@
 	.global _start
 	.type _start,#function
 _start:
-#ifdef SHARED
+#ifdef PIC
 	SETUP_PIC_REG(l7)
 #endif
 
@@ -58,7 +58,7 @@ _start:
 	add	%sp, STACK_BIAS+23*8, %o2
 
   /* Load the addresses of the user entry points.  */
-#ifndef SHARED
+#ifndef PIC
 	sethi	%hi(main), %o0
 	sethi	%hi(__libc_csu_init), %o3
 	sethi	%hi(__libc_csu_fini), %o4
-- 
2.13.6

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sparc: Check PIC instead of SHARED in start.S
  2017-09-29 21:30 [PATCH] sparc: Check PIC instead of SHARED in start.S H.J. Lu
@ 2018-02-03 14:04 ` H.J. Lu
  2018-02-05 13:27   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2018-02-03 14:04 UTC (permalink / raw)
  To: GNU C Library

FYI. This patch fixed:

https://sourceware.org/bugzilla/show_bug.cgi?id=22638

OK for master?

On Fri, Sep 29, 2017 at 2:30 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> Since start.o may be compiled as PIC, we should check PIC instead of
> SHARED.
>
> OK for master?
>
>         * sysdeps/sparc/sparc32/start.S (_start): Check PIC instead of
>         SHARED.
>         * sysdeps/sparc/sparc64/start.S (_start): Likewise.
> ---
>  sysdeps/sparc/sparc32/start.S | 4 ++--
>  sysdeps/sparc/sparc64/start.S | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/sysdeps/sparc/sparc32/start.S b/sysdeps/sparc/sparc32/start.S
> index a06568d0e9..b882d1e61f 100644
> --- a/sysdeps/sparc/sparc32/start.S
> +++ b/sysdeps/sparc/sparc32/start.S
> @@ -42,7 +42,7 @@
>         .global _start
>         .type _start,#function
>  _start:
> -#ifdef SHARED
> +#ifdef PIC
>         SETUP_PIC_REG(l7)
>  #endif
>
> @@ -57,7 +57,7 @@ _start:
>         add     %sp, 23*4, %o2
>
>    /* Load the addresses of the user entry points.  */
> -#ifndef SHARED
> +#ifndef PIC
>         sethi   %hi(main), %o0
>         sethi   %hi(__libc_csu_init), %o3
>         sethi   %hi(__libc_csu_fini), %o4
> diff --git a/sysdeps/sparc/sparc64/start.S b/sysdeps/sparc/sparc64/start.S
> index fcd4721463..21d16de804 100644
> --- a/sysdeps/sparc/sparc64/start.S
> +++ b/sysdeps/sparc/sparc64/start.S
> @@ -42,7 +42,7 @@
>         .global _start
>         .type _start,#function
>  _start:
> -#ifdef SHARED
> +#ifdef PIC
>         SETUP_PIC_REG(l7)
>  #endif
>
> @@ -58,7 +58,7 @@ _start:
>         add     %sp, STACK_BIAS+23*8, %o2
>
>    /* Load the addresses of the user entry points.  */
> -#ifndef SHARED
> +#ifndef PIC
>         sethi   %hi(main), %o0
>         sethi   %hi(__libc_csu_init), %o3
>         sethi   %hi(__libc_csu_fini), %o4
> --
> 2.13.6
>



-- 
H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sparc: Check PIC instead of SHARED in start.S
  2018-02-03 14:04 ` H.J. Lu
@ 2018-02-05 13:27   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2018-02-05 13:27 UTC (permalink / raw)
  To: hjl.tools; +Cc: libc-alpha

From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Sat, 3 Feb 2018 06:04:17 -0800

> FYI. This patch fixed:
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=22638
> 
> OK for master?

Yes.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-05 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-29 21:30 [PATCH] sparc: Check PIC instead of SHARED in start.S H.J. Lu
2018-02-03 14:04 ` H.J. Lu
2018-02-05 13:27   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).