[patch] Fix MIPS pipe, brk
Mike Frysinger
vapier at gentoo.org
Tue Jan 3 05:11:48 UTC 2006
On Monday 02 January 2006 21:58, Joseph S. Myers wrote:
> The MIPS implementation of the pipe syscall has various problems, fixed by
> this patch:
mips/pipe.c isnt actually used in uClibc ... Makefile.arch pulls in pipe.S,
not pipe.c ...
> * The list of clobbers for the asm is incomplete; the proper list to use
> for all syscalls is that used in bits/syscalls.h. The brk implementation
> has this issue as well, so this patch fixes it for brk as well as pipe.
brk.c that we are using is almost the same as the version used in glibc ...
the only difference is below ... so if uClibc brk.c is broken, then the
version in glibc is as well right ?
--- libc/sysdeps/linux/mips/brk.c (revision 13038)
+++ libc/sysdeps/linux/mips/brk.c (working copy)
@@ -31,9 +31,10 @@
register long int res __asm__ ("$2");
asm ("move\t$4,%2\n\t"
+ "li\t%0,%1\n\t"
"syscall" /* Perform the system call. */
: "=r" (res)
- : "0" (__NR_brk), "r" (addr)
+ : "I" (__NR_brk), "r" (addr)
: "$4", "$7");
newbrk = (void *) res;
}
-mike
More information about the uClibc
mailing list