Merge "Hide __signalfd4, used to implement signalfd(3)."
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index 83feb65..4a21582 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -228,7 +228,7 @@
int __rt_sigprocmask:rt_sigprocmask(int, const sigset_t*, sigset_t*, size_t) all
int __rt_sigsuspend:rt_sigsuspend(const sigset_t*, size_t) all
int __rt_sigtimedwait:rt_sigtimedwait(const sigset_t*, struct siginfo_t*, struct timespec_t*, size_t) all
-int signalfd4(int, const sigset_t*, size_t, int) all
+int __signalfd4:signalfd4(int, const sigset_t*, size_t, int) all
# sockets
int socket(int, int, int) arm,arm64,mips,mips64,x86_64
diff --git a/libc/arch-arm/syscalls/signalfd4.S b/libc/arch-arm/syscalls/__signalfd4.S
similarity index 87%
rename from libc/arch-arm/syscalls/signalfd4.S
rename to libc/arch-arm/syscalls/__signalfd4.S
index f8d8a28..712f975 100644
--- a/libc/arch-arm/syscalls/signalfd4.S
+++ b/libc/arch-arm/syscalls/__signalfd4.S
@@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
-ENTRY(signalfd4)
+ENTRY(__signalfd4)
mov ip, r7
ldr r7, =__NR_signalfd4
swi #0
@@ -11,4 +11,4 @@
bxls lr
neg r0, r0
b __set_errno
-END(signalfd4)
+END(__signalfd4)
diff --git a/libc/arch-arm64/syscalls/signalfd4.S b/libc/arch-arm64/syscalls/__signalfd4.S
similarity index 86%
rename from libc/arch-arm64/syscalls/signalfd4.S
rename to libc/arch-arm64/syscalls/__signalfd4.S
index 7a8f7f7..91510f6 100644
--- a/libc/arch-arm64/syscalls/signalfd4.S
+++ b/libc/arch-arm64/syscalls/__signalfd4.S
@@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
-ENTRY(signalfd4)
+ENTRY(__signalfd4)
stp x29, x30, [sp, #-16]!
mov x29, sp
str x8, [sp, #-16]!
@@ -18,4 +18,5 @@
b.hi __set_errno
ret
-END(signalfd4)
+END(__signalfd4)
+.hidden __signalfd4
diff --git a/libc/arch-mips/syscalls/signalfd4.S b/libc/arch-mips/syscalls/__signalfd4.S
similarity index 87%
rename from libc/arch-mips/syscalls/signalfd4.S
rename to libc/arch-mips/syscalls/__signalfd4.S
index e2c2a30..cc9b212 100644
--- a/libc/arch-mips/syscalls/signalfd4.S
+++ b/libc/arch-mips/syscalls/__signalfd4.S
@@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
-ENTRY(signalfd4)
+ENTRY(__signalfd4)
.set noreorder
.cpload t9
li v0, __NR_signalfd4
@@ -16,4 +16,4 @@
j t9
nop
.set reorder
-END(signalfd4)
+END(__signalfd4)
diff --git a/libc/arch-mips64/syscalls/signalfd4.S b/libc/arch-mips64/syscalls/__signalfd4.S
similarity index 86%
rename from libc/arch-mips64/syscalls/signalfd4.S
rename to libc/arch-mips64/syscalls/__signalfd4.S
index 594c73d..c4fe77b 100644
--- a/libc/arch-mips64/syscalls/signalfd4.S
+++ b/libc/arch-mips64/syscalls/__signalfd4.S
@@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
-ENTRY(signalfd4)
+ENTRY(__signalfd4)
.set push
.set noreorder
li v0, __NR_signalfd4
@@ -22,4 +22,5 @@
j t9
move ra, t0
.set pop
-END(signalfd4)
+END(__signalfd4)
+.hidden __signalfd4
diff --git a/libc/arch-x86/syscalls/signalfd4.S b/libc/arch-x86/syscalls/__signalfd4.S
similarity index 94%
rename from libc/arch-x86/syscalls/signalfd4.S
rename to libc/arch-x86/syscalls/__signalfd4.S
index 1fe6c68..7cbe474 100644
--- a/libc/arch-x86/syscalls/signalfd4.S
+++ b/libc/arch-x86/syscalls/__signalfd4.S
@@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
-ENTRY(signalfd4)
+ENTRY(__signalfd4)
pushl %ebx
pushl %ecx
pushl %edx
@@ -31,4 +31,4 @@
popl %ecx
popl %ebx
ret
-END(signalfd4)
+END(__signalfd4)
diff --git a/libc/arch-x86_64/syscalls/signalfd4.S b/libc/arch-x86_64/syscalls/__signalfd4.S
similarity index 84%
rename from libc/arch-x86_64/syscalls/signalfd4.S
rename to libc/arch-x86_64/syscalls/__signalfd4.S
index 4d8a1b6..fafe371 100644
--- a/libc/arch-x86_64/syscalls/signalfd4.S
+++ b/libc/arch-x86_64/syscalls/__signalfd4.S
@@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
-ENTRY(signalfd4)
+ENTRY(__signalfd4)
movq %rcx, %r10
movl $__NR_signalfd4, %eax
syscall
@@ -14,4 +14,5 @@
orq $-1, %rax
1:
ret
-END(signalfd4)
+END(__signalfd4)
+.hidden __signalfd4
diff --git a/libc/bionic/signalfd.cpp b/libc/bionic/signalfd.cpp
index 36ef81d..63e1db4 100644
--- a/libc/bionic/signalfd.cpp
+++ b/libc/bionic/signalfd.cpp
@@ -30,9 +30,9 @@
#include "private/kernel_sigset_t.h"
-extern "C" int signalfd4(int fd, kernel_sigset_t* mask, size_t sizemask, int flags);
+extern "C" int __signalfd4(int fd, kernel_sigset_t* mask, size_t sizemask, int flags);
int signalfd(int fd, const sigset_t* mask, int flags) {
kernel_sigset_t in_set(mask);
- return signalfd4(fd, &in_set, sizeof(in_set), flags);
+ return __signalfd4(fd, &in_set, sizeof(in_set), flags);
}