Hello, In Linux user mode, system call _llseek returns EINVAL when offset_low >= 2 GB. Replacing __NR_llseek by __NR__llseek has solved the bug (note the missing underscore).
diff -Naur qemu-1.5.2-orig/linux-user/ openrisc/syscall_nr.h qemu-1.5.2-new/linux-user/openrisc/syscall_nr.h --- qemu-1.5.2-orig/linux-user/openrisc/syscall_nr.h 2013-07-25 23:01:44.000000000 +0200 +++ qemu-1.5.2-new/linux-user/openrisc/syscall_nr.h 2013-07-26 22:30: 12.894996804 +0200 @@ -493,7 +493,7 @@ #define TARGET_NR_fstatfs64 TARGET_NR_3264_fstatfs #define TARGET_NR_truncate64 TARGET_NR_3264_truncate #define TARGET_NR_ftruncate64 TARGET_NR_3264_ftruncate -#define TARGET_NR_llseek TARGET_NR_3264_lseek +#define TARGET_NR__llseek TARGET_NR_3264_lseek #define TARGET_NR_sendfile64 TARGET_NR_3264_sendfile #define TARGET_NR_fstatat64 TARGET_NR_3264_fstatat #define TARGET_NR_fstat64 TARGET_NR_3264_fstat diff -Naur qemu-1.5.2-orig/linux-user/syscall.c qemu-1.5.2-new/linux-user/syscall.c --- qemu-1.5.2-orig/linux-user/syscall.c 2013-07-25 23:01:44.000000000 +0200 +++ qemu-1.5.2-new/linux-user/syscall.c 2013-07-26 22:26:19.203918344+0200 @@ -227,7 +227,7 @@ #if defined(TARGET_NR_getdents64) && defined(__NR_getdents64) _syscall3(int, sys_getdents64, uint, fd, struct linux_dirent64 *, dirp, uint, count); #endif -#if defined(TARGET_NR__llseek) && defined(__NR_llseek) +#if defined(TARGET_NR__llseek) && defined(__NR__llseek) _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, loff_t *, res, uint, wh); #endif @@ -7106,7 +7106,7 @@ case TARGET_NR__llseek: { int64_t res; -#if !defined(__NR_llseek) +#if !defined(__NR__llseek) res = lseek(arg1, ((uint64_t)arg2 << 32) | arg3, arg5); if (res == -1) { ret = get_errno(res);