summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/or1k/or1k_clone.S
diff options
context:
space:
mode:
authorStafford Horne <shorne@gmail.com>2019-08-27 05:58:44 +0900
committerWaldemar Brodkorb <wbx@openadk.org>2019-10-05 18:13:23 +0200
commit0fcfaee3e1e4575570ccecae087f920d29ff936c (patch)
tree6621733017611a59f95fb1414edbfc28751b17c0 /libc/sysdeps/linux/or1k/or1k_clone.S
parent3538ba34e0e415105d3fe235605e6dba1597ad98 (diff)
or1k: Fix compiling with PIC and latest binutils use PLT for __syscall_error
This symbol was causing a build failure with the new toolchain. It looks like it has always been wrong. The main issue was checking for PIC rather than __PIC__. Remove all PSEUDO_* macros and ther SYSCALL_ERROR_NAME macro as they are not needed by uclibc-ng, they are used in glibc for building up syscalls there, but not here. Fixes error: /opt/shorne/software/or1k-linux/bin/../lib/gcc/or1k-linux/9.0.1/../../../../or1k-linux/bin/ld: libc/libc_so.a(or1k_clone.os): pc-relative relocation against dynamic symbol __syscall_error /opt/shorne/software/or1k-linux/bin/../lib/gcc/or1k-linux/9.0.1/../../../../or1k-linux/bin/ld: final link failed: bad value Signed-off-by: Stafford Horne <shorne@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/or1k/or1k_clone.S')
-rw-r--r--libc/sysdeps/linux/or1k/or1k_clone.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/or1k/or1k_clone.S b/libc/sysdeps/linux/or1k/or1k_clone.S
index a2c16ac9e..2de873a02 100644
--- a/libc/sysdeps/linux/or1k/or1k_clone.S
+++ b/libc/sysdeps/linux/or1k/or1k_clone.S
@@ -71,7 +71,11 @@ L(oldpid):
l.ori r3, r11, 0
L(error):
- l.j SYSCALL_ERROR_NAME
+#ifdef __PIC__
+ l.j plt(__syscall_error)
+#else
+ l.j __syscall_error
+#endif
l.ori r3,r11,0
-PSEUDO_END (__or1k_clone)
+END (__or1k_clone)