From patchwork Fri Sep 1 17:59:49 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: 22530 Received: (qmail 86575 invoked by alias); 1 Sep 2017 18:00:57 -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 86536 invoked by uid 89); 1 Sep 2017 18:00:57 -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 18/58] Mark internal utmp functions with attribute_hidden [BZ #18822] Date: Fri, 1 Sep 2017 10:59:49 -0700 Message-Id: <20170901180029.9527-19-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> Mark internal utmp functions with attribute_hidden to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/utmp.h (__updwtmp): Add attribute_hidden. (__utmpname): Likewise. (__getutent): Likewise. (__setutent): Likewise. (__endutent): Likewise. (__getutid): Likewise. (__getutline): Likewise. (__pututline): Likewise. (__getutent_r): Likewise. (__getutid_r): Likewise. (__getutline_r): Likewise. --- include/utmp.h | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/include/utmp.h b/include/utmp.h index 6b2e262362..38538963e2 100644 --- a/include/utmp.h +++ b/include/utmp.h @@ -4,19 +4,25 @@ # ifndef _ISOMAC /* Now define the internal interfaces. */ -extern void __updwtmp (const char *__wtmp_file, const struct utmp *__utmp); -extern int __utmpname (const char *__file); -extern struct utmp *__getutent (void); -extern void __setutent (void); -extern void __endutent (void); -extern struct utmp *__getutid (const struct utmp *__id); -extern struct utmp *__getutline (const struct utmp *__line); -extern struct utmp *__pututline (const struct utmp *__utmp_ptr); -extern int __getutent_r (struct utmp *__buffer, struct utmp **__result); +extern void __updwtmp (const char *__wtmp_file, const struct utmp *__utmp) + attribute_hidden; +extern int __utmpname (const char *__file) attribute_hidden; +extern struct utmp *__getutent (void) attribute_hidden; +extern void __setutent (void) attribute_hidden; +extern void __endutent (void) attribute_hidden; +extern struct utmp *__getutid (const struct utmp *__id) attribute_hidden; +extern struct utmp *__getutline (const struct utmp *__line) + attribute_hidden; +extern struct utmp *__pututline (const struct utmp *__utmp_ptr) + attribute_hidden; +extern int __getutent_r (struct utmp *__buffer, struct utmp **__result) + attribute_hidden; extern int __getutid_r (const struct utmp *__id, struct utmp *__buffer, - struct utmp **__result); + struct utmp **__result) + attribute_hidden; extern int __getutline_r (const struct utmp *__line, - struct utmp *__buffer, struct utmp **__result); + struct utmp *__buffer, struct utmp **__result) + attribute_hidden; libutil_hidden_proto (login_tty)