From patchwork Fri Sep 1 18:00:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 22529 Received: (qmail 86464 invoked by alias); 1 Sep 2017 18:00:56 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 86404 invoked by uid 89); 1 Sep 2017 18:00:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=H*m:gmail X-HELO: mga06.intel.com X-ExtLoop1: 1 From: "H.J. Lu" To: libc-alpha@sourceware.org Subject: [PATCH 58/58] Hide internal fadvise64/fallocate64 functions [BZ #18822] Date: Fri, 1 Sep 2017 11:00:29 -0700 Message-Id: <20170901180029.9527-59-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> Hide internal fadvise64/fallocate64 functions to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * sysdeps/unix/sysv/linux/posix_fadvise64.c (__posix_fadvise64_l64): Add Add libc_hidden_proto and libc_hidden_def. * sysdeps/unix/sysv/linux/posix_fallocate64.c (__posix_fallocate64_l64): Likewise. --- sysdeps/unix/sysv/linux/posix_fadvise64.c | 2 ++ sysdeps/unix/sysv/linux/posix_fallocate64.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/posix_fadvise64.c b/sysdeps/unix/sysv/linux/posix_fadvise64.c index aaee60add7..6dee86c833 100644 --- a/sysdeps/unix/sysv/linux/posix_fadvise64.c +++ b/sysdeps/unix/sysv/linux/posix_fadvise64.c @@ -20,6 +20,7 @@ #include int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise); +libc_hidden_proto (__posix_fadvise64_l64) /* Both arm and powerpc implements fadvise64_64 with last 'advise' argument just after 'fd' to avoid the requirement of implementing 7-arg syscalls. @@ -83,3 +84,4 @@ weak_alias (__posix_fadvise64_l64, posix_fadvise64); weak_alias (__posix_fadvise64_l64, posix_fadvise64); strong_alias (__posix_fadvise64_l64, posix_fadvise); #endif +libc_hidden_def (__posix_fadvise64_l64) diff --git a/sysdeps/unix/sysv/linux/posix_fallocate64.c b/sysdeps/unix/sysv/linux/posix_fallocate64.c index eb05f7c5d0..76cf27a616 100644 --- a/sysdeps/unix/sysv/linux/posix_fallocate64.c +++ b/sysdeps/unix/sysv/linux/posix_fallocate64.c @@ -19,6 +19,7 @@ #include extern int __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len); +libc_hidden_proto (__posix_fallocate64_l64) #define __posix_fallocate64_l64 static internal_fallocate64 #include #undef __posix_fallocate64_l64 @@ -42,3 +43,4 @@ __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len) return INTERNAL_SYSCALL_ERRNO (res, err); return internal_fallocate64 (fd, offset, len); } +libc_hidden_def (__posix_fallocate64_l64)