Use ENTRY/END in custom x86 assembler too.
Change-Id: Ic2e482e5daff29c65d3b2ab0b2111c996bbc6226
diff --git a/libc/arch-x86/bionic/futex_x86.S b/libc/arch-x86/bionic/futex_x86.S
index e98a391..096f72c 100644
--- a/libc/arch-x86/bionic/futex_x86.S
+++ b/libc/arch-x86/bionic/futex_x86.S
@@ -1,17 +1,11 @@
+#include <machine/asm.h>
#include <sys/linux-syscalls.h>
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
-
-/*
- * int __futex_wait(volatile void *ftx, int val, const struct timespec *timeout)
- */
-.text
-.globl __futex_wait
-.type __futex_wait, @function
-.align 4
-__futex_wait:
+// int __futex_wait(volatile void *ftx, int val, const struct timespec *timeout)
+ENTRY(__futex_wait)
pushl %ebx
pushl %esi
mov 12(%esp), %ebx /* ftx */
@@ -23,15 +17,11 @@
popl %esi
popl %ebx
ret
+END(__futex_wait)
-/* int __futex_wake(volatile void *ftx, int count) */
-
-.text
-.globl __futex_wake
-.type __futex_wake, @function
-.align 4
-__futex_wake:
+// int __futex_wake(volatile void *ftx, int count)
+ENTRY(__futex_wake)
pushl %ebx
mov 8(%esp), %ebx /* ftx */
movl $FUTEX_WAKE, %ecx
@@ -40,13 +30,10 @@
int $0x80
popl %ebx
ret
+END(__futex_wake)
-/* int __futex_syscall3(volatile void *ftx, int op, int count) */
-.text
-.globl __futex_syscall3
-.type __futex_syscall3, @function
-.align 4
-__futex_syscall3:
+// int __futex_syscall3(volatile void *ftx, int op, int count)
+ENTRY(__futex_syscall3)
pushl %ebx
movl 8(%esp), %ebx /* ftx */
movl 12(%esp), %ecx /* op */
@@ -55,13 +42,10 @@
int $0x80
popl %ebx
ret
+END(__futex_syscall3)
-/* int __futex_syscall4(volatile void *ftx, int op, int val, const struct timespec *timeout) */
-.text
-.globl __futex_syscall4
-.type __futex_syscall4, @function
-.align 4
-__futex_syscall4:
+// int __futex_syscall4(volatile void *ftx, int op, int val, const struct timespec *timeout)
+ENTRY(__futex_syscall4)
pushl %ebx
pushl %esi
movl 12(%esp), %ebx /* ftx */
@@ -73,3 +57,4 @@
popl %esi
popl %ebx
ret
+END(__futex_syscall4)