From: John Hodge Date: Tue, 11 Oct 2011 09:01:22 +0000 (+0800) Subject: Libraries/ld-acess - Cleaning up X-Git-Tag: rel0.12~9 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=40b3565d79c0fd55f83e6470a458945efa21f6da;p=tpg%2Facess2.git Libraries/ld-acess - Cleaning up --- diff --git a/Usermode/Libraries/ld-acess.so_src/arch/x86_64.asm.h b/Usermode/Libraries/ld-acess.so_src/arch/x86_64.asm.h index 2c9d87fc..ea605ef6 100644 --- a/Usermode/Libraries/ld-acess.so_src/arch/x86_64.asm.h +++ b/Usermode/Libraries/ld-acess.so_src/arch/x86_64.asm.h @@ -142,8 +142,10 @@ _SYSCALL_TAIL ; // Override the clone syscall #define clone _clone_raw +#define _exit _exit_raw #include "syscalls.s.h" #undef clone +#undef _exit [global clone:func] clone: @@ -162,11 +164,16 @@ clone: sub rsi, 3*8 .doCall: mov eax, SYS_CLONE - mov rdi, rsi ; Stack - mov rsi, [rbp+2*8] ; Flags SYSCALL_OP mov [rel _errno], ebx pop rbx pop rbp ret +[global _exit:func] +_exit: + xor eax, eax + SYSCALL_OP + jmp $ + +; vim: ft=nasm diff --git a/Usermode/Libraries/ld-acess.so_src/loadlib.c b/Usermode/Libraries/ld-acess.so_src/loadlib.c index 182109bf..b6637c22 100644 --- a/Usermode/Libraries/ld-acess.so_src/loadlib.c +++ b/Usermode/Libraries/ld-acess.so_src/loadlib.c @@ -5,7 +5,7 @@ #include "common.h" #include -#define DEBUG 1 +#define DEBUG 0 #if DEBUG # define DEBUGS(v...) SysDebug(v) diff --git a/Usermode/Libraries/libc.so_src/stub.c b/Usermode/Libraries/libc.so_src/stub.c index fbdf30d0..3cab984d 100644 --- a/Usermode/Libraries/libc.so_src/stub.c +++ b/Usermode/Libraries/libc.so_src/stub.c @@ -83,6 +83,7 @@ int ErrorHandler(int Fault) // fprintf(stderr, "%02i: %p %s\n", i, gLoadedLibraries[i].Base, gLoadedLibraries[i].Name); } fprintf(stderr, "\n"); + exit(-1); return -1; }