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]

Re: [PATCH] mips-linux, static/non-PIC: errno is wrong


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


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