[PATCH] mips-linux, static/non-PIC: errno is wrong
Johannes Stezenbach
js@convergence.de
Wed Oct 16 06:19:00 GMT 2002
Hi,
I've built a static, non-PIC version for use in an embedded
Linux/MIPS project.
Unfortunately, non-PIC code trashes the errno after a syscall.
Here's a patch (also applies to current CVS):
--- glibc-2.2.5/sysdeps/unix/mips/sysdep.h.orig 2002-10-15 00:18:02.000000000 +0200
+++ glibc-2.2.5/sysdeps/unix/mips/sysdep.h 2002-10-15 00:18:53.000000000 +0200
@@ -49,7 +49,8 @@
#define PSEUDO(name, syscall_name, args) \
.set noreorder; \
.align 2; \
- 99: j __syscall_error; \
+ 99: j __syscall_error; \
+ nop; \
ENTRY(name) \
.set noreorder; \
li v0, SYS_ify(syscall_name); \
Regards,
Johannes
More information about the Libc-alpha
mailing list