config(Makefile): remove -no-pie

This commit is contained in:
gbrochar 2024-03-10 20:07:02 +01:00
parent 69b65b653a
commit cd40b66c0e
5 changed files with 6 additions and 6 deletions

View File

@ -25,7 +25,7 @@ $(NAME): $(OBJ)
ar rcs libasm.a $(OBJ)
test: $(NAME)
gcc -Wall -Werror -Wextra -no-pie -g ft_list_print.c main.c -L. -lasm -o libasm_unit_tests
gcc -Wall -Werror -Wextra -g ft_list_print.c main.c -L. -lasm -o libasm_unit_tests
clean:
rm $(OBJ)

View File

@ -6,7 +6,7 @@ ft_list_push_front:
push rdi
push rsi
mov rdi, 16
call malloc
call malloc WRT ..plt
cmp rax, 0
je .done
pop rsi
@ -28,7 +28,7 @@ ft_list_push_front:
; mov rdi, 16
; call malloc
; pop rsi
; pop rdi
; pop rdi
; ;cmp rax, 0
; ;je .error
;

View File

@ -11,7 +11,7 @@ ft_read:
cmp eax, -4095
jl .done
mov rbx, rax ; save return value of syscall
call __errno_location ; put address of errno in rax
call __errno_location WRT ..plt; put address of errno in rax
neg rbx ; errno should be positive
mov [rax], rbx ; set errno
mov rax, -1 ; set return value of ft_read to -1

View File

@ -12,7 +12,7 @@ ft_strdup:
call ft_strlen
mov rdi, rax
inc rdi
call malloc
call malloc WRT ..plt
cmp rax, 0
jz .done
leave

View File

@ -11,7 +11,7 @@ ft_write:
cmp eax, -4095
jl .done
mov rbx, rax ; save return value of syscall
call __errno_location ; put address of errno in rax
call __errno_location WRT ..plt ; put address of errno in rax
neg rbx ; errno should be positive
mov [rax], rbx ; set errno
mov rax, -1 ; set return value of ft_write to -1