[PATCH 1/2] MIPS: Convert __syscall_error() callers to use $a0 for argument

2012-06-05 Thread Kevin Cernekee
Some callers passed the first argument in $v0, while others used $a0. Change the callers to use $a0 consistently. Signed-off-by: Kevin Cernekee --- libc/sysdeps/linux/mips/vfork.S|1 + .../unix/sysv/linux/mips/mips64/sysdep-cancel.h|2 +- .../sysdeps/unix/sysv/lin

[PATCH 2/2] MIPS: Use $a0 instead of $v0 for __syscall_error() argument

2012-06-05 Thread Kevin Cernekee
$a0 is saved across _dl_runtime_resolve(); $v0 is not. Unfortunately, __syscall_error() uses $v0 for its argument, not $a0 as is the MIPS ABI standard. This means that if lazy binding was used for __syscall_error(), the errno value in $v0 could get corrupted. The problem can be easily seen in te