From cd40b66c0e5b6eef85e3f317af1b070c6086e44d Mon Sep 17 00:00:00 2001 From: gbrochar Date: Sun, 10 Mar 2024 20:07:02 +0100 Subject: [PATCH] config(Makefile): remove -no-pie --- Makefile | 2 +- ft_list_push_front.s | 4 ++-- ft_read.s | 2 +- ft_strdup.s | 2 +- ft_write.s | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 97134bb..9efc6bf 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/ft_list_push_front.s b/ft_list_push_front.s index 6ddfea4..39e80f5 100644 --- a/ft_list_push_front.s +++ b/ft_list_push_front.s @@ -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 ; diff --git a/ft_read.s b/ft_read.s index d434b3c..1eae6a2 100644 --- a/ft_read.s +++ b/ft_read.s @@ -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 diff --git a/ft_strdup.s b/ft_strdup.s index 68ac018..683e9d8 100644 --- a/ft_strdup.s +++ b/ft_strdup.s @@ -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 diff --git a/ft_write.s b/ft_write.s index 0ef58c4..6c040b1 100644 --- a/ft_write.s +++ b/ft_write.s @@ -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