public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@redhat.com>
To: libc-hacker@sourceware.org
Subject: [PATCH] Avoid PLT calls in utmp compat wrappers on Linux/s390
Date: Tue, 26 Jan 2010 18:18:00 -0000	[thread overview]
Message-ID: <m3tyu8hgqe.fsf@hase.home> (raw)

2010-01-26  Andreas Schwab  <schwab@redhat.com>

	* sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c: Use internal
	interface.
	* sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h: Declare internal
	utmpx interface.

diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c b/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c
index 32a5d71..bf07f68 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c
@@ -62,7 +62,7 @@
 struct utmp32 *
 getutid32 (const struct utmp32 *id)
 {
-  ACCESS_UTMP_ENTRY (getutid, id)
+  ACCESS_UTMP_ENTRY (__getutid, id)
 }
 symbol_version (getutid32, getutid, GLIBC_2.0);
 
@@ -71,7 +71,7 @@ symbol_version (getutid32, getutid, GLIBC_2.0);
 struct utmp32 *
 getutline32 (const struct utmp32 *line)
 {
-  ACCESS_UTMP_ENTRY (getutline, line)
+  ACCESS_UTMP_ENTRY (__getutline, line)
 }
 symbol_version (getutline32, getutline, GLIBC_2.0);
 
@@ -79,7 +79,7 @@ symbol_version (getutline32, getutline, GLIBC_2.0);
 struct utmp32 *
 pututline32 (const struct utmp32 *utmp_ptr)
 {
-  ACCESS_UTMP_ENTRY (pututline, utmp_ptr)
+  ACCESS_UTMP_ENTRY (__pututline, utmp_ptr)
 }
 symbol_version (pututline32, pututline, GLIBC_2.0);
 
@@ -90,7 +90,7 @@ getutent32 (void)
   struct utmp *out64;
   ALLOCATE_UTMP32_OUT (out32);
 
-  out64 = getutent ();
+  out64 = __getutent ();
   if (!out64)
     return NULL;
 
@@ -108,7 +108,7 @@ getutent32_r (struct utmp32 *buffer, struct utmp32 **result)
   struct utmp *out64p;
   int ret;
 
-  ret = getutent_r (&out64, &out64p);
+  ret = __getutent_r (&out64, &out64p);
   if (ret == -1)
     {
       *result = NULL;
@@ -133,7 +133,7 @@ getutid32_r (const struct utmp32 *id, struct utmp32 *buffer,
 
   utmp_convert32to64 (id, &in64);
 
-  ret = getutid_r (&in64, &out64, &out64p);
+  ret = __getutid_r (&in64, &out64, &out64p);
   if (ret == -1)
     {
       *result = NULL;
@@ -158,7 +158,7 @@ getutline32_r (const struct utmp32 *line,
 
   utmp_convert32to64 (line, &in64);
 
-  ret = getutline_r (&in64, &out64, &out64p);
+  ret = __getutline_r (&in64, &out64, &out64p);
   if (ret == -1)
     {
       *result = NULL;
@@ -180,6 +180,6 @@ updwtmp32 (const char *wtmp_file, const struct utmp32 *utmp)
   struct utmp in32;
 
   utmp_convert32to64 (utmp, &in32);
-  updwtmp (wtmp_file, &in32);
+  __updwtmp (wtmp_file, &in32);
 }
 symbol_version (updwtmp32, updwtmp, GLIBC_2.0);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c
index 69a1384..f566f50 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c
@@ -68,7 +68,7 @@ getutxent32 (void)
   struct utmpx *out64;
   ALLOCATE_UTMPX32_OUT (out32);
 
-  out64 = getutxent ();
+  out64 = __getutxent ();
   if (!out64)
     return NULL;
 
@@ -82,7 +82,7 @@ symbol_version (getutxent32, getutxent, GLIBC_2.1);
 struct utmpx32 *
 getutxid32 (const struct utmpx32 *id)
 {
-  ACCESS_UTMPX_ENTRY (getutxid, id);
+  ACCESS_UTMPX_ENTRY (__getutxid, id);
 }
 symbol_version (getutxid32, getutxid, GLIBC_2.1);
 
@@ -90,7 +90,7 @@ symbol_version (getutxid32, getutxid, GLIBC_2.1);
 struct utmpx32 *
 getutxline32 (const struct utmpx32 *line)
 {
-  ACCESS_UTMPX_ENTRY (getutxline, line);
+  ACCESS_UTMPX_ENTRY (__getutxline, line);
 }
 symbol_version (getutxline32, getutxline, GLIBC_2.1);
 
@@ -98,7 +98,7 @@ symbol_version (getutxline32, getutxline, GLIBC_2.1);
 struct utmpx32 *
 pututxline32 (const struct utmpx32 *utmpx)
 {
-  ACCESS_UTMPX_ENTRY (pututxline, utmpx);
+  ACCESS_UTMPX_ENTRY (__pututxline, utmpx);
 }
 symbol_version (pututxline32, pututxline, GLIBC_2.1);
 
@@ -109,7 +109,7 @@ updwtmpx32 (const char *wtmpx_file, const struct utmpx32 *utmpx)
   struct utmpx in64;
 
   utmpx_convert32to64 (utmpx, &in64);
-  updwtmpx (wtmpx_file, &in64);
+  __updwtmpx (wtmpx_file, &in64);
 }
 symbol_version (updwtmpx32, updwtmpx, GLIBC_2.1);
 
@@ -121,7 +121,7 @@ getutmp32 (const struct utmpx32 *utmpx, struct utmp32 *utmp)
   struct utmp out64;
 
   utmpx_convert32to64 (utmpx, &in64);
-  getutmp (&in64, &out64);
+  __getutmp (&in64, &out64);
   utmp_convert64to32 (&out64, utmp);
 }
 symbol_version (getutmp32, getutmp, GLIBC_2.1.1);
@@ -134,7 +134,7 @@ getutmpx32 (const struct utmp32 *utmp, struct utmpx32 *utmpx)
   struct utmpx out64;
 
   utmp_convert32to64 (utmp, &in64);
-  getutmpx (&in64, &out64);
+  __getutmpx (&in64, &out64);
   utmpx_convert64to32 (&out64, utmpx);
 }
 symbol_version (getutmpx32, getutmpx, GLIBC_2.1.1);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h
index 5f468ed..c61e1cd 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h
@@ -49,4 +49,16 @@ struct utmpx32
   char __unused[20];		/* Reserved for future use.  */
 };
 
+/* The internal interface needed by the compat wrapper functions.  */
+extern struct utmpx *__getutxent (void);
+extern struct utmpx *__getutxid (__const struct utmpx *__id);
+extern struct utmpx *__getutxline (__const struct utmpx *__line);
+extern struct utmpx *__pututxline (__const struct utmpx *__utmpx);
+extern void __updwtmpx (__const char *__wtmpx_file,
+			__const struct utmpx *__utmpx);
+extern void __getutmp (__const struct utmpx *__utmpx,
+		       struct utmp *__utmp);
+extern void __getutmpx (__const struct utmp *__utmp,
+			struct utmpx *__utmpx);
+
 #endif /* utmpx32.h */
-- 
1.6.6


Andreas.

-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

                 reply	other threads:[~2010-01-26 18:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3tyu8hgqe.fsf@hase.home \
    --to=schwab@redhat.com \
    --cc=libc-hacker@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).