Skip to content
Snippets Groups Projects
Commit 40b3565d authored by John Hodge's avatar John Hodge
Browse files

Libraries/ld-acess - Cleaning up

parent 7b023841
No related merge requests found
......@@ -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
......@@ -5,7 +5,7 @@
#include "common.h"
#include <stdint.h>
#define DEBUG 1
#define DEBUG 0
#if DEBUG
# define DEBUGS(v...) SysDebug(v)
......
......@@ -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;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment