Ensure raw fchmod/fchmodat syscalls are hidden.
In https://android-review.googlesource.com/#/c/127908/5/libc/SYSCALLS.TXT@116
Elliott said:
for LP64 these will be hidden. for LP32 we were cowards and left
them all public for compatibility (though i don't think we ever
dremeled to see whether it was needed). we don't have an easy
way to recognize additions, though, so we can't prevent adding
new turds.
Add a mechanism to prevent the adding of new turds, and use that
mechanism on the fchmod/fchmodat system calls.
Bug: 19233951
Change-Id: I98f98345970b631a379f348df57858f9fc3d57c0
diff --git a/libc/arch-x86/syscalls/__fchmod.S b/libc/arch-x86/syscalls/___fchmod.S
similarity index 91%
rename from libc/arch-x86/syscalls/__fchmod.S
rename to libc/arch-x86/syscalls/___fchmod.S
index 7ad213e..119a695 100644
--- a/libc/arch-x86/syscalls/__fchmod.S
+++ b/libc/arch-x86/syscalls/___fchmod.S
@@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
-ENTRY(__fchmod)
+ENTRY(___fchmod)
pushl %ebx
.cfi_def_cfa_offset 8
.cfi_rel_offset ebx, 0
@@ -23,4 +23,5 @@
popl %ecx
popl %ebx
ret
-END(__fchmod)
+END(___fchmod)
+.hidden ___fchmod
diff --git a/libc/arch-x86/syscalls/__fchmodat.S b/libc/arch-x86/syscalls/___fchmodat.S
similarity index 91%
rename from libc/arch-x86/syscalls/__fchmodat.S
rename to libc/arch-x86/syscalls/___fchmodat.S
index f03c03f..b15bb64 100644
--- a/libc/arch-x86/syscalls/__fchmodat.S
+++ b/libc/arch-x86/syscalls/___fchmodat.S
@@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
-ENTRY(__fchmodat)
+ENTRY(___fchmodat)
pushl %ebx
.cfi_def_cfa_offset 8
.cfi_rel_offset ebx, 0
@@ -28,4 +28,5 @@
popl %ecx
popl %ebx
ret
-END(__fchmodat)
+END(___fchmodat)
+.hidden ___fchmodat