From 0a587a8a98ca32c98e6b00f557e6af6c8eedc602 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 4 Sep 2017 13:38:36 -0700 Subject: Hide __chmod and __mkdir [BZ #18822] Hide internal __chmod and __mkdir functions to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/sys/stat.h (__chmod): Add libc_hidden_proto. (__mkdir): Likewise. * io/chmod.c (__chmod): Add libc_hidden_def. * io/mkdir.c (__mkdir): Likewise. * sysdeps/mach/hurd/chmod.c (__chmod): Likewise. * sysdeps/mach/hurd/mkdir.c (__mkdir): Likewise. * sysdeps/unix/sysv/linux/generic/chmod.c (__chmod): Likewise. * sysdeps/unix/sysv/linux/generic/mkdir.c (__mkdir): Likewise. --- include/sys/stat.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sys') diff --git a/include/sys/stat.h b/include/sys/stat.h index 4f31c00eca..eb44754185 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -7,9 +7,11 @@ extern int __stat (const char *__file, struct stat *__buf); extern int __fstat (int __fd, struct stat *__buf); extern int __lstat (const char *__file, struct stat *__buf); extern int __chmod (const char *__file, __mode_t __mode); +libc_hidden_proto (__chmod) extern int __fchmod (int __fd, __mode_t __mode); extern __mode_t __umask (__mode_t __mask); extern int __mkdir (const char *__path, __mode_t __mode); +libc_hidden_proto (__mkdir) extern int __mknod (const char *__path, __mode_t __mode, __dev_t __dev); #if IS_IN (libc) || IS_IN (rtld) -- cgit v1.2.3