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. --- sysdeps/unix/sysv/linux/generic/chmod.c | 2 ++ sysdeps/unix/sysv/linux/generic/mkdir.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'sysdeps/unix/sysv/linux') diff --git a/sysdeps/unix/sysv/linux/generic/chmod.c b/sysdeps/unix/sysv/linux/generic/chmod.c index 41d6d9851f..551c67cd07 100644 --- a/sysdeps/unix/sysv/linux/generic/chmod.c +++ b/sysdeps/unix/sysv/linux/generic/chmod.c @@ -28,4 +28,6 @@ __chmod (const char *file, mode_t mode) { return INLINE_SYSCALL (fchmodat, 3, AT_FDCWD, file, mode); } + +libc_hidden_def (__chmod) weak_alias (__chmod, chmod) diff --git a/sysdeps/unix/sysv/linux/generic/mkdir.c b/sysdeps/unix/sysv/linux/generic/mkdir.c index 6571d29ca3..7eebe90ba7 100644 --- a/sysdeps/unix/sysv/linux/generic/mkdir.c +++ b/sysdeps/unix/sysv/linux/generic/mkdir.c @@ -30,4 +30,6 @@ __mkdir (const char *path, mode_t mode) { return INLINE_SYSCALL (mkdirat, 3, AT_FDCWD, path, mode); } + +libc_hidden_def (__mkdir) weak_alias (__mkdir, mkdir) -- cgit 1.4.1