This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] mips-linux, static/non-PIC: errno is wrong
- From: Johannes Stezenbach <js at convergence dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: Wed, 16 Oct 2002 15:19:48 +0200
- Subject: [PATCH] mips-linux, static/non-PIC: errno is wrong
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