From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27482 invoked by alias); 26 Jan 2010 18:18:59 -0000 Received: (qmail 27466 invoked by uid 22791); 26 Jan 2010 18:18:59 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 Jan 2010 18:18:53 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0QIIpi4008015 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 26 Jan 2010 13:18:51 -0500 Received: from hase.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0QIInAd011841 for ; Tue, 26 Jan 2010 13:18:50 -0500 From: Andreas Schwab To: libc-hacker@sourceware.org Subject: [PATCH] Avoid PLT calls in utmp compat wrappers on Linux/s390 X-Yow: Just to have MORE FUN, I'll pretend I am JAMES CAGNEY and I am having a tense, UP-TIGHT EXPERIENCE!! Date: Tue, 26 Jan 2010 18:18:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00011.txt.bz2 2010-01-26 Andreas Schwab * 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."