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)
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue