diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-02-24 11:49:02 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-02-24 11:49:02 +0100 |
| commit | a2347a0780a90d9f7add3f63a9752229262eedc2 (patch) | |
| tree | 2b6fb558efba349483bcbbced6fcdfc9cef0c00f | |
| parent | d6240e3f6aeb342aaf13284c7cc93226970648aa (diff) | |
| download | libasm-a2347a0780a90d9f7add3f63a9752229262eedc2.tar.gz libasm-a2347a0780a90d9f7add3f63a9752229262eedc2.tar.bz2 libasm-a2347a0780a90d9f7add3f63a9752229262eedc2.zip | |
Fixing compilation on OSX by moving wrt..plt in LINUX preprocessing directives
| -rw-r--r-- | ft_list_push_front.s | 4 | ||||
| -rw-r--r-- | ft_list_remove_if.s | 4 | ||||
| -rw-r--r-- | ft_read.s | 4 | ||||
| -rw-r--r-- | ft_strdup.s | 4 | ||||
| -rw-r--r-- | ft_write.s | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/ft_list_push_front.s b/ft_list_push_front.s index 4eedf75..072f1e7 100644 --- a/ft_list_push_front.s +++ b/ft_list_push_front.s @@ -12,7 +12,7 @@ %ifdef __LINUX__ %define M_FT_LIST_PUSH_FRONT ft_list_push_front - %define M_MALLOC malloc + %define M_MALLOC malloc wrt ..plt %else %define M_FT_LIST_PUSH_FRONT _ft_list_push_front %define M_MALLOC _malloc @@ -31,7 +31,7 @@ M_FT_LIST_PUSH_FRONT: push rsi xor rdi, rdi mov edi, 16 - call M_MALLOC wrt ..plt + call M_MALLOC pop rsi pop rdi cmp rax, 0 diff --git a/ft_list_remove_if.s b/ft_list_remove_if.s index 61f3410..e415768 100644 --- a/ft_list_remove_if.s +++ b/ft_list_remove_if.s @@ -12,7 +12,7 @@ %ifdef __LINUX__ %define M_FT_LIST_REMOVE_IF ft_list_remove_if - %define M_FREE free + %define M_FREE free wrt ..plt %else %define M_FT_LIST_REMOVE_IF _ft_list_remove_if %define M_FREE _free @@ -88,7 +88,7 @@ FT_LIST_REMOVE_IF_REMOVE: EXTERN_FUNCTION_SAVE mov rdi, [rdi] - call M_FREE wrt ..plt ; free(*begin_list) + call M_FREE ; free(*begin_list) EXTERN_FUNCTION_SAVE_END mov rax, [rbp - 8] @@ -12,7 +12,7 @@ %ifdef __LINUX__ %define M_FT_READ ft_read - %define M_ERRNO_LOCATION __errno_location + %define M_ERRNO_LOCATION __errno_location wrt ..plt %define M_SYSCALL_READ 0x0 %else %define M_FT_READ _ft_read @@ -41,7 +41,7 @@ FT_READ_ERROR: neg rax %endif push rax - call M_ERRNO_LOCATION wrt ..plt + call M_ERRNO_LOCATION pop qword [rax] mov rax, -1 ret diff --git a/ft_strdup.s b/ft_strdup.s index 09ae2ba..7de9077 100644 --- a/ft_strdup.s +++ b/ft_strdup.s @@ -15,7 +15,7 @@ %define M_FT_STRDUP ft_strdup %define M_FT_STRLEN ft_strlen %define M_FT_STRCPY ft_strcpy - %define M_MALLOC malloc + %define M_MALLOC malloc wrt ..plt %else %define M_FT_STRDUP _ft_strdup %define M_FT_STRLEN _ft_strlen @@ -38,7 +38,7 @@ M_FT_STRDUP: inc rax ; len++ for '\0' mov rdi, rax ; size to malloc - call M_MALLOC wrt ..plt + call M_MALLOC cmp rax, 0 je FT_STRDUP_ERROR @@ -12,7 +12,7 @@ %ifdef __LINUX__ %define M_FT_WRITE ft_write - %define M_ERRNO_LOCATION __errno_location + %define M_ERRNO_LOCATION __errno_location wrt ..plt %define M_SYSCALL_WRITE 0x1 %else %define M_FT_WRITE _ft_write @@ -41,7 +41,7 @@ FT_WRITE_ERROR: neg rax %endif push rax - call M_ERRNO_LOCATION wrt ..plt + call M_ERRNO_LOCATION pop qword [rax] mov rax, -1 ret |
