From patchwork Fri Sep 1 18:00:14 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: 22556 Received: (qmail 90916 invoked by alias); 1 Sep 2017 18:01:24 -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 90629 invoked by uid 89); 1 Sep 2017 18:01:22 -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: mga02.intel.com X-ExtLoop1: 1 From: "H.J. Lu" To: libc-alpha@sourceware.org Subject: [PATCH 43/58] Hide internal __hasmntopt function [BZ #18822] Date: Fri, 1 Sep 2017 11:00:14 -0700 Message-Id: <20170901180029.9527-44-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> Hide internal __hasmntopt function to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/mntent.h (__hasmntopt): Add libc_hidden_proto. * misc/mntent_r.c (__hasmntopt): Add libc_hidden_def. --- include/mntent.h | 1 + misc/mntent_r.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/mntent.h b/include/mntent.h index 169210fc66..a16298ed6e 100644 --- a/include/mntent.h +++ b/include/mntent.h @@ -15,6 +15,7 @@ extern char *__hasmntopt (const struct mntent *__mnt, const char *__opt); libc_hidden_proto (__setmntent) libc_hidden_proto (__getmntent_r) libc_hidden_proto (__endmntent) +libc_hidden_proto (__hasmntopt) # endif /* !_ISOMAC */ #endif diff --git a/misc/mntent_r.c b/misc/mntent_r.c index 30f55212be..96bd1e2fb4 100644 --- a/misc/mntent_r.c +++ b/misc/mntent_r.c @@ -293,4 +293,5 @@ __hasmntopt (const struct mntent *mnt, const char *opt) return NULL; } +libc_hidden_def (__hasmntopt) weak_alias (__hasmntopt, hasmntopt)