change labels from global to local in functions, align function calls in stack
This commit is contained in:
@ -7,13 +7,15 @@ ft_read:
|
||||
syscall
|
||||
|
||||
cmp rax, 0 ; if return is < 0, it's an error in negative
|
||||
jge success
|
||||
jge .success
|
||||
|
||||
neg rax ; inv errno, and set errno
|
||||
mov edi, eax
|
||||
sub rsp, 8
|
||||
call __errno_location wrt ..plt
|
||||
add rsp, 8
|
||||
mov [rax], edi
|
||||
mov rax, -1
|
||||
|
||||
success:
|
||||
.success:
|
||||
ret
|
||||
|
Reference in New Issue
Block a user