tile: Check SHARED instead PIC for SYSCALL_ERROR_NAME

Message ID 20170929212914.GA2482@gmail.com
State Committed
Commit bcc4e4bb316cf5a29cd1488a582700a3f33cee2b
Headers

Commit Message

H.J. Lu Sept. 29, 2017, 9:29 p.m. UTC
  For static PIE code, PIC is defined and SHARED is undefined.  We
should check SHARED instead PIC for SYSCALL_ERROR_NAME.

OK for master?

	* sysdeps/unix/sysv/linux/tile/sysdep.h (SYSCALL_ERROR_NAME):
	Check SHARED instead PIC.
---
 sysdeps/unix/sysv/linux/tile/sysdep.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Chris Metcalf Oct. 3, 2017, 3:20 p.m. UTC | #1
On 9/29/2017 5:29 PM, H.J. Lu wrote:
> For static PIE code, PIC is defined and SHARED is undefined.  We
> should check SHARED instead PIC for SYSCALL_ERROR_NAME.
>
> OK for master?
>
> 	* sysdeps/unix/sysv/linux/tile/sysdep.h (SYSCALL_ERROR_NAME):
> 	Check SHARED instead PIC.
> ---
>   sysdeps/unix/sysv/linux/tile/sysdep.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, that looks good.  Please commit.
  

Patch

diff --git a/sysdeps/unix/sysv/linux/tile/sysdep.h b/sysdeps/unix/sysv/linux/tile/sysdep.h
index fb1b89c280..6e37fd2a08 100644
--- a/sysdeps/unix/sysv/linux/tile/sysdep.h
+++ b/sysdeps/unix/sysv/linux/tile/sysdep.h
@@ -42,7 +42,7 @@ 
 
 #define ret  jrp lr
 
-#ifndef PIC
+#ifndef SHARED
 /* For static code, on error jump to __syscall_error directly. */
 # define SYSCALL_ERROR_NAME __syscall_error
 #elif IS_IN (libc) || IS_IN (libpthread)