change labels from global to local in functions, align function calls in stack

This commit is contained in:
2025-08-06 20:10:05 +02:00
parent 2a65c14032
commit caa21a3fb0
11 changed files with 119 additions and 108 deletions

View File

@ -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