From ece7bd6dc17ba91deff32a9c121af80bcc1e79f2 Mon Sep 17 00:00:00 2001 From: faissaloo Date: Sat, 23 Jul 2016 18:47:54 +0100 Subject: Switched from weird jump system to a normal call + ret --- sh | Bin 4704 -> 4688 bytes sh.asm | 11 ++++------- sh.o | Bin 5008 -> 4912 bytes 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sh b/sh index 2f2d395..f1a78d3 100755 Binary files a/sh and b/sh differ diff --git a/sh.asm b/sh.asm index 38d47a8..a1dc0be 100644 --- a/sh.asm +++ b/sh.asm @@ -72,8 +72,7 @@ _read_loop: syscall mov r8, -0x1 - mov r12, _read_loopr - jmp _bzero + call _bzero _read_loopr: mov rax, sys_read @@ -140,8 +139,7 @@ _parse_path: jl _quit mov r8, -0x1 - mov r12, _parse_path2 - jmp _bzero + call _bzero _parse_path2: mov rdi, rax @@ -209,7 +207,7 @@ _bzero: mov byte [r8+r15], 0x0 cmp r8, 0xff jle _bzero - jmp r12 + ret ;input: r15 (buffer) ;output: r13 (path), r14 (arguments) @@ -372,8 +370,7 @@ _treg: jg _boe xchg r15, rbx mov r8, -0x1 - mov r12, _jrsinc - jmp _bzero + call _bzero _jrsinc: xchg r15, rbx diff --git a/sh.o b/sh.o index 37df737..d628f83 100644 Binary files a/sh.o and b/sh.o differ -- cgit v1.2.3