Skip to content

Commit d68c1db

Browse files
committed
short: shorten the shorter prestub
1 parent 38b7045 commit d68c1db

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

scripts/static-pie-prestub-amd64-shorter.asm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,9 @@ _decode_output:
5656
jnz _decode_output
5757
jmp _decode_loop
5858
_decode_zeros:
59-
xchg eax, edx
6059
movzx ecx, byte [rdi-1]
6160
dec rdi
62-
rep stosb
63-
xchg eax, edx
61+
rep stosb ; the fact we jumped to here ensures al=0
6462
jmp _decode_loop_2
6563

6664
; Jump to entrypoint

scripts/static-pie-prestub-amd64-shorter.bin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
j X�E1�V1�j^�j"AZj�AX^H�����,#�r%t�Ȓ�,$k�[Ъ����u��ߒ�O�H�����H+���
1+
j X�E1�V1�j^�j"AZj�AX^H�����,#�r#t�Ȓ�,$k�[Ъ����u���O�H�����H+���

scripts/static-pie-template-amd64-shorter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
$$$$solution_src$$$$
66
}
77
// SOLUTION END
8-
#[no_link]extern crate std;#[no_mangle]unsafe fn _start(){std::arch::asm!(".quad 56c931459958096ah,6a07b25e016aff31h,0f5841ff6a5a4122h,0e0c11fb097485e05h,74257299232cac0dh,6b242cac92c8fe16h,8e8c1aad0015bc0h,92dfebf77510c4f6h,0f3cfff48ff4fb60fh,0f87f2b48d5eb92aah,59391",in("rsi")r$$$$binary_raw_base91$$$$.as_ptr())}
8+
#[no_link]extern crate std;#[no_mangle]unsafe fn _start(){std::arch::asm!(".quad 56c931459958096ah,6a07b25e016aff31h,0f5841ff6a5a4122h,0e0c11fb097485e05h,74237299232cac0dh,6b242cac92c8fe16h,8e8c1aad0015bc0h,0fdfebf77510c4f6h,0aaf3cfff48ff4fb6h,0e7fff87f2b48d7ebh",in("rsi")r$$$$binary_raw_base91$$$$.as_ptr())}

0 commit comments

Comments
 (0)