This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [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
- Cc: Andreas Jaeger <aj at suse dot de>
- Date: Wed, 23 Oct 2002 16:28:02 +0200
- Subject: Re: [PATCH] mips-linux, static/non-PIC: errno is wrong
- References: <20021016131948.GA25378@convergence.de>
On Wed, Oct 16, 2002 at 03:19:48PM +0200, I wrote:
>
> 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); \
It seems that the non-PIC configuration on linux-mips is not of
interest to anyone but me. It wouldn't hurt to correct the bug,
though. AJ, I Cc:ed you because it seems that you were the last
one who comitted changes sysdep.h.
Maybe you like the following (equivalent) patch better:
--- sysdep.h.orig 2002-10-23 16:19:29.000000000 +0200
+++ sysdep.h 2002-10-23 16:19:40.000000000 +0200
@@ -47,7 +47,6 @@
syse1:
#else
#define PSEUDO(name, syscall_name, args) \
- .set noreorder; \
.align 2; \
99: j __syscall_error; \
ENTRY(name) \
Regards,
Johannes