riscv64: fix linking with binutils 2.40
[uclibc-ng.git] / libc / sysdeps / linux / i386 / vfork.S
blob6c4102e0a1167355fe700ec7f05179e1ecc6121b
1 /*
2  * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
3  *
4  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
5  */
7 #include <sys/syscall.h>
9 #ifndef __NR_vfork
10 /* No vfork so use fork instead */
11 # define __NR_vfork __NR_fork
12 #endif
14 .text
15 .global __vfork
16 .hidden __vfork
17 .type   __vfork,%function
19 __vfork:
20         popl %ecx
22         movl $__NR_vfork,%eax
23         int $0x80
24         pushl %ecx
26         cmpl $-4095,%eax
27         jae __syscall_error
28         ret
30 .size __vfork,.-__vfork
32 weak_alias(__vfork,vfork)
33 libc_hidden_def(vfork)