config(Makefile): remove -no-pie
This commit is contained in:
parent
69b65b653a
commit
cd40b66c0e
2
Makefile
2
Makefile
|
@ -25,7 +25,7 @@ $(NAME): $(OBJ)
|
||||||
ar rcs libasm.a $(OBJ)
|
ar rcs libasm.a $(OBJ)
|
||||||
|
|
||||||
test: $(NAME)
|
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:
|
clean:
|
||||||
rm $(OBJ)
|
rm $(OBJ)
|
||||||
|
|
|
@ -6,7 +6,7 @@ ft_list_push_front:
|
||||||
push rdi
|
push rdi
|
||||||
push rsi
|
push rsi
|
||||||
mov rdi, 16
|
mov rdi, 16
|
||||||
call malloc
|
call malloc WRT ..plt
|
||||||
cmp rax, 0
|
cmp rax, 0
|
||||||
je .done
|
je .done
|
||||||
pop rsi
|
pop rsi
|
||||||
|
@ -28,7 +28,7 @@ ft_list_push_front:
|
||||||
; mov rdi, 16
|
; mov rdi, 16
|
||||||
; call malloc
|
; call malloc
|
||||||
; pop rsi
|
; pop rsi
|
||||||
; pop rdi
|
; pop rdi
|
||||||
; ;cmp rax, 0
|
; ;cmp rax, 0
|
||||||
; ;je .error
|
; ;je .error
|
||||||
;
|
;
|
||||||
|
|
|
@ -11,7 +11,7 @@ ft_read:
|
||||||
cmp eax, -4095
|
cmp eax, -4095
|
||||||
jl .done
|
jl .done
|
||||||
mov rbx, rax ; save return value of syscall
|
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
|
neg rbx ; errno should be positive
|
||||||
mov [rax], rbx ; set errno
|
mov [rax], rbx ; set errno
|
||||||
mov rax, -1 ; set return value of ft_read to -1
|
mov rax, -1 ; set return value of ft_read to -1
|
||||||
|
|
|
@ -12,7 +12,7 @@ ft_strdup:
|
||||||
call ft_strlen
|
call ft_strlen
|
||||||
mov rdi, rax
|
mov rdi, rax
|
||||||
inc rdi
|
inc rdi
|
||||||
call malloc
|
call malloc WRT ..plt
|
||||||
cmp rax, 0
|
cmp rax, 0
|
||||||
jz .done
|
jz .done
|
||||||
leave
|
leave
|
||||||
|
|
|
@ -11,7 +11,7 @@ ft_write:
|
||||||
cmp eax, -4095
|
cmp eax, -4095
|
||||||
jl .done
|
jl .done
|
||||||
mov rbx, rax ; save return value of syscall
|
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
|
neg rbx ; errno should be positive
|
||||||
mov [rax], rbx ; set errno
|
mov [rax], rbx ; set errno
|
||||||
mov rax, -1 ; set return value of ft_write to -1
|
mov rax, -1 ; set return value of ft_write to -1
|
||||||
|
|
Loading…
Reference in New Issue