This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]