Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
vondehi
Commits
7c542d2b
Commit
7c542d2b
authored
Sep 26, 2018
by
blackle
Browse files
Use waitpid instead of waitid to save four bytes
parent
3a60aa21
Changes
1
Hide whitespace changes
Inline
Side-by-side
vondehi.asm
View file @
7c542d2b
...
...
@@ -12,7 +12,7 @@
%define SYS_memfd_create 356
%define SYS_fork 2
%define SYS_waitid
284
%define SYS_wait
p
id
7
%define SYS_execve 11
%define SYS_open 5
%define SYS_lseek 19
...
...
@@ -27,14 +27,16 @@ org 0xEBDB0000
ehdr:
;~e_ident
; jg short 0x47 (inc ebp) ; dec esp ; inc esi
db
0x7F
,
"EL"
;"F" ;!E_MAGIC
_parent:
inc
esi
db
0x7F
,
"ELF"
;!E_MAGIC
_parent.0:
xor
ebx
,
ebx
mov
ax
,
SYS_waitid
lea
esi
,
[
ebx
+
P_ALL
]
xchg
eax
,
edi
;edi is zero now and will be overwritten eventually
mov
al
,
SYS_waitpid
int
0x80
nop
nop
nop
nop
db
0x3D
; cmp eax, ...
dw
2
;!e_type
...
...
@@ -109,7 +111,7 @@ _start.4:
int
0x80
test
eax
,
eax
jnz
short
_parent
jnz
short
_parent
.0
;jz short _child
;_parent:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment