Révision | 0fcfaee3e1e4575570ccecae087f920d29ff936c (tree) |
---|---|
l'heure | 2019-10-06 01:13:23 |
Auteur | Stafford Horne <shorne@gmai...> |
Commiter | Waldemar Brodkorb |
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:
Signed-off-by: Stafford Horne <shorne@gmail.com>
@@ -71,7 +71,11 @@ L(oldpid): | ||
71 | 71 | l.ori r3, r11, 0 |
72 | 72 | |
73 | 73 | L(error): |
74 | - l.j SYSCALL_ERROR_NAME | |
74 | +#ifdef __PIC__ | |
75 | + l.j plt(__syscall_error) | |
76 | +#else | |
77 | + l.j __syscall_error | |
78 | +#endif | |
75 | 79 | l.ori r3,r11,0 |
76 | 80 | |
77 | -PSEUDO_END (__or1k_clone) | |
81 | +END (__or1k_clone) |
@@ -43,38 +43,6 @@ License along with the GNU C Library; if not, see | ||
43 | 43 | l.sys 1; \ |
44 | 44 | l.nop |
45 | 45 | |
46 | -#define PSEUDO(name, syscall_name, args) \ | |
47 | - ENTRY (name); \ | |
48 | - DO_CALL(syscall_name); \ | |
49 | - /* if -4096 < ret < 0 holds, it's an error */ \ | |
50 | - l.sfgeui r11, 0xf001; \ | |
51 | - l.bf L(pseudo_end); \ | |
52 | - l.nop | |
53 | - | |
54 | -#define PSEUDO_NOERRNO(name, syscall_name, args) \ | |
55 | - ENTRY (name); \ | |
56 | - DO_CALL(syscall_name) | |
57 | - | |
58 | -#define PSEUDO_END(name) \ | |
59 | -L(pseudo_end): \ | |
60 | - l.j SYSCALL_ERROR_NAME; \ | |
61 | - l.ori r3,r11,0; \ | |
62 | - END (name) | |
63 | - | |
64 | -#define PSEUDO_END_NOERRNO(name) \ | |
65 | - END (name) | |
66 | - | |
67 | -#ifndef PIC | |
68 | -/* For static code, on error jump to __syscall_error directly. */ | |
69 | -# define SYSCALL_ERROR_NAME __syscall_error | |
70 | -#elif NOT_IN_libc | |
71 | -/* Use the internal name for libc/libpthread shared objects. */ | |
72 | -# define SYSCALL_ERROR_NAME __GI___syscall_error | |
73 | -#else | |
74 | -/* Otherwise, on error do a full PLT jump. */ | |
75 | -# define SYSCALL_ERROR_NAME plt(__syscall_error) | |
76 | -#endif | |
77 | - | |
78 | 46 | /* Make use of .size directive. */ |
79 | 47 | #define ASM_SIZE_DIRECTIVE(name) .size name,.-name; |
80 | 48 |