From 1430a00339faab000239ec1bad8b24c310dd37a8 Mon Sep 17 00:00:00 2001 From: "John Hodge (sonata)" Date: Sat, 19 Jan 2013 19:36:02 +0800 Subject: [PATCH] Usermode/ld-acess - Fixed ARMv7 edge case with 64-bit syscall args - They get aligned to even registers --- Usermode/Libraries/ld-acess.so_src/arch/armv7.S.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Usermode/Libraries/ld-acess.so_src/arch/armv7.S.h b/Usermode/Libraries/ld-acess.so_src/arch/armv7.S.h index 2c85b14e..351c8414 100644 --- a/Usermode/Libraries/ld-acess.so_src/arch/armv7.S.h +++ b/Usermode/Libraries/ld-acess.so_src/arch/armv7.S.h @@ -100,9 +100,23 @@ _errno: .long 0 @ Placed in .text, to allow use of relative addressing // Override the clone syscall #define _exit _exit_raw #define _clone _clone_raw +#define _SysSeek _SysSeek_borken #include "syscalls.s.h" #undef _exit #undef _clone +#undef _SysSeek + +// NOTE: _SysSeek needs special handling for alignment +.globl _SysSeek +_SysSeek: + push {lr} + mov r1,r2 + mov r2,r3 + ldr r3, [sp,#4] + svc #SYS_SEEK + ldr r3, =_errno + str r2, [r3] + pop {pc} .globl _clone _clone: @@ -120,6 +134,7 @@ _clone_ret: pop {r4} mov pc, lr + .globl _exit _exit: svc #0 -- 2.20.1