This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 18/58] Mark internal utmp functions with attribute_hidden [BZ #18822]
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Fri, 1 Sep 2017 10:59:49 -0700
- Subject: [PATCH 18/58] Mark internal utmp functions with attribute_hidden [BZ #18822]
- Authentication-results: sourceware.org; auth=none
- 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)
--
2.13.5