Skip to content

Commit

Permalink
sparc: Check PIC instead of SHARED in start.S
Browse files Browse the repository at this point in the history
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.

[gentoo note: the patch is not yet applied upstream]
https://bugs.gentoo.org/640966
https://sourceware.org/ml/libc-alpha/2017-09/msg01140.html

(cherry picked from commit fec4983)
  • Loading branch information
H dot J dot Lu authored and akhuettel committed May 25, 2018
1 parent 7978443 commit dec42d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sysdeps/sparc/sparc32/start.S
Expand Up @@ -42,7 +42,7 @@
.global _start
.type _start,#function
_start:
#ifdef SHARED
#ifdef PIC
SETUP_PIC_REG(l7)
#endif

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/sparc/sparc64/start.S
Expand Up @@ -42,7 +42,7 @@
.global _start
.type _start,#function
_start:
#ifdef SHARED
#ifdef PIC
SETUP_PIC_REG(l7)
#endif

Expand All @@ -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
Expand Down

0 comments on commit dec42d1

Please sign in to comment.