From patchwork Wed May 14 00:43:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 898 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id A29AD360098 for ; Tue, 13 May 2014 17:43:16 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14307373) id 3B1675716231; Tue, 13 May 2014 17:43:16 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx22.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id EB2895716223 for ; Tue, 13 May 2014 17:43:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=jAVv/y1i9FRa5l7kxdcXjvNjmEor3 0S/3hJk8zG7C52NngkTevrlfaf6HZj9dk5vOICTsT6w2JBTdD5INF+DJG9xlZhEc YtCUAL4LZn18GuDEDkSmfxYViBgrcVifvqdr3mTSY/UeK/t27qXAvs93XkGUMP+p mA0KQ7uJMeosVw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=MyKGtWzPmCO3fKEHU8V0yT8mYbc=; b=vUg MDlVExFo1W33wBCpNFTmlOon3KNj2v18o+fVvgKIQzPL63CszDFQ/5k6S+ptRPMd ColKwL67BKNeDDHKY01TEo5/0bpiWqJPBI7IjC3XdIYHYD+HuBk9WrEwyPK5relO dK+fqGeny3M7hqGQDAMUi4QhWTjxlCp2BXajuu+M= Received: (qmail 7484 invoked by alias); 14 May 2014 00:43:13 -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 7468 invoked by uid 89); 14 May 2014 00:43:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_50 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Wed, 14 May 2014 00:43:01 +0000 From: "Joseph S. Myers" To: Subject: Clean up ARM old-ABI symbol versioning relics Message-ID: MIME-Version: 1.0 X-DH-Original-To: glibc@patchwork.siddhesh.in This patch cleans up some symbol versioning code in the ARM port that exists only as relics of the old-ABI port, which was removed some time ago. The minimum symbol version in the ARM port is GLIBC_2.4 (the version where the EABI port was introduced). Thus, any SHLIB_COMPAT conditionals where the later version is 2.4 or earlier are obsolete and can be removed. In addition, there is no need to set symbol versions before 2.4 explicitly if the symbols would have a version of 2.4 by default anyway. This includes most of the entries in sysdeps/unix/sysv/linux/arm/Versions: those for GLIBC_2.0 are for libgcc unwind functions that aren't actually in ARM EABI glibc at all, while those for GLIBC_2.2 and GLIBC_2.3.3 are for functions which for the old-ABI port may have had versions different from the architecture-independent default, but where for EABI the default suffices (both the default and the version in that file map to 2.4, so the entries in that file do nothing). The GLIBC_2.1 entries are needed (architecture-specific functions), but it seems less confusing for those to say GLIBC_2.4, as the actual version those symbols in fact have. Various cases in the functions where a function is defined as __fe* with an fe* versioned alias are cleaned up just to define fe* directly, as done e.g. on AArch64. If in future we actually need an __fe* name for use from C90 functions in libm as discussed recently, of course we can add one on all architectures and make the fe* name into a weak alias for that particular function, but for now the __fe* names aren't needed. In the case of posix_fadvise64, the __posix_fadvise64_l64 name and posix_fadvise64 alias are kept as __posix_fadvise64_l64 is used in posix_fadvise. (For that to be a namespace-clean use, posix_fadvise64 needs to be a *weak* alias not a strong one as at present, but that's an independent preexisting bug.) (There remain references to GLIBC_2_2 in sysdeps/unix/sysv/linux/arm/{msgctl.c,semctl.c,shmctl.c}. As those files are used by alpha which has a genuine 2.2 version for those functions, I think those references need to stay as-is.) Tested that the disassembly of installed shared libraries is unchanged by this patch (though function names shown in disassembly change to no longer have @@GLIBC_2.4, now those functions get versioned only by the version map and not redundantly at assembler time) and that the ABI tests pass. Committed. 2014-05-14 Joseph Myers * sysdeps/arm/fclrexcpt.c (__feclearexcept): Rename to feclearexcept. Remove symbol versioning code. * sysdeps/arm/fegetenv.c (__fegetenv): Rename to fegetenv. Remove symbol versioning code. * sysdeps/arm/fesetenv.c (__fesetenv): Rename to fesetenv. Remove symbol versioning code. * sysdeps/arm/feupdateenv.c (__feupdateenv): Rename to feupdateenv. Remove symbol versioning code. * sysdeps/arm/fgetexcptflg.c (__fegetexceptflag): Rename to fegetexceptflag. Remove symbol versioning code. * sysdeps/arm/fsetexcptflg.c (__fesetexceptflag): Rename to fesetexceptflag. Remove symbol versioning code. * sysdeps/unix/sysv/linux/arm/Versions (libc): Remove GLIBC_2.0, GLIBC_2.2 and GLIBC_2.3.3 entries. Change GLIBC_2.1 to GLIBC_2.4. * sysdeps/unix/sysv/linux/arm/posix_fadvise64.c (__posix_fadvise64_l32): Remove prototype. [SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)]: Remove conditional code. diff --git a/sysdeps/arm/fclrexcpt.c b/sysdeps/arm/fclrexcpt.c index 8b54114..72eaab9 100644 --- a/sysdeps/arm/fclrexcpt.c +++ b/sysdeps/arm/fclrexcpt.c @@ -22,7 +22,7 @@ int -__feclearexcept (int excepts) +feclearexcept (int excepts) { if (ARM_HAVE_VFP) { @@ -47,12 +47,4 @@ __feclearexcept (int excepts) /* Unsupported, so fail unless nothing needs to be done. */ return (excepts != 0); } - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feclearexcept, __old_feclearexcept) -compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); -#endif - -libm_hidden_ver (__feclearexcept, feclearexcept) -versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); +libm_hidden_def (feclearexcept) diff --git a/sysdeps/arm/fegetenv.c b/sysdeps/arm/fegetenv.c index 7003a01..a45c1af 100644 --- a/sysdeps/arm/fegetenv.c +++ b/sysdeps/arm/fegetenv.c @@ -22,7 +22,7 @@ int -__fegetenv (fenv_t *envp) +fegetenv (fenv_t *envp) { if (ARM_HAVE_VFP) { @@ -37,12 +37,4 @@ __fegetenv (fenv_t *envp) /* Unsupported, so fail. */ return 1; } - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fegetenv, __old_fegetenv) -compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); -#endif - -libm_hidden_ver (__fegetenv, fegetenv) -versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); +libm_hidden_def (fegetenv) diff --git a/sysdeps/arm/fesetenv.c b/sysdeps/arm/fesetenv.c index af4f25d..dabb88b 100644 --- a/sysdeps/arm/fesetenv.c +++ b/sysdeps/arm/fesetenv.c @@ -22,7 +22,7 @@ int -__fesetenv (const fenv_t *envp) +fesetenv (const fenv_t *envp) { if (ARM_HAVE_VFP) { @@ -58,6 +58,4 @@ __fesetenv (const fenv_t *envp) return 1; } -#include -libm_hidden_ver (__fesetenv, fesetenv) -versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); +libm_hidden_def (fesetenv) diff --git a/sysdeps/arm/feupdateenv.c b/sysdeps/arm/feupdateenv.c index 58ec5f6..f5deb60 100644 --- a/sysdeps/arm/feupdateenv.c +++ b/sysdeps/arm/feupdateenv.c @@ -23,7 +23,7 @@ int -__feupdateenv (const fenv_t *envp) +feupdateenv (const fenv_t *envp) { if (ARM_HAVE_VFP) { @@ -45,12 +45,4 @@ __feupdateenv (const fenv_t *envp) /* Unsupported, so fail. */ return 1; } - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feupdateenv, __old_feupdateenv) -compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); -#endif - -libm_hidden_ver (__feupdateenv, feupdateenv) -versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); +libm_hidden_def (feupdateenv) diff --git a/sysdeps/arm/fgetexcptflg.c b/sysdeps/arm/fgetexcptflg.c index 1145979..beb43be 100644 --- a/sysdeps/arm/fgetexcptflg.c +++ b/sysdeps/arm/fgetexcptflg.c @@ -23,7 +23,7 @@ int -__fegetexceptflag (fexcept_t *flagp, int excepts) +fegetexceptflag (fexcept_t *flagp, int excepts) { if (ARM_HAVE_VFP) { @@ -41,10 +41,3 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) /* Unsupported, so fail. */ return 1; } - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fegetexceptflag, __old_fegetexceptflag) -compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); -#endif -versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); diff --git a/sysdeps/arm/fsetexcptflg.c b/sysdeps/arm/fsetexcptflg.c index 0c88c0f..7e3d007 100644 --- a/sysdeps/arm/fsetexcptflg.c +++ b/sysdeps/arm/fsetexcptflg.c @@ -23,7 +23,7 @@ int -__fesetexceptflag (const fexcept_t *flagp, int excepts) +fesetexceptflag (const fexcept_t *flagp, int excepts) { if (ARM_HAVE_VFP) { @@ -46,11 +46,3 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) /* Unsupported, so fail unless nothing needs to be done. */ return (excepts != 0); } - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fesetexceptflag, __old_fesetexceptflag) -compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); -#endif - -versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index be3f197..b0e9a4c 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -1,39 +1,9 @@ libc { - GLIBC_2.0 { - # Exception handling support functions from libgcc - __register_frame; __register_frame_table; __deregister_frame; - __frame_state_for; __register_frame_info_table; - } - GLIBC_2.1 { + GLIBC_2.4 { ioperm; iopl; inb; inw; inl; outb; outw; outl; } - GLIBC_2.2 { - # functions used in other libraries - __xstat64; __fxstat64; __lxstat64; - - # a* - alphasort64; - - # g* - glob64; - - # New rlimit interface - getrlimit; setrlimit; getrlimit64; - - # r* - readdir64; readdir64_r; - - # s* - scandir64; - - # v* - versionsort64; - } - GLIBC_2.3.3 { - posix_fadvise64; posix_fallocate64; - } GLIBC_2.11 { fallocate64; } diff --git a/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c index 7c14eec..fc61c79 100644 --- a/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c +++ b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c @@ -20,7 +20,6 @@ #include int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise); -int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise); /* Advice the system about the expected behaviour of the application with respect to the file associated with FD. */ @@ -36,20 +35,4 @@ __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise) return 0; return INTERNAL_SYSCALL_ERRNO (ret, err); } - -#include - -#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3) - -int -attribute_compat_text_section -__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise) -{ - return __posix_fadvise64_l64 (fd, offset, len, advise); -} - -versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3); -compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2); -#else strong_alias (__posix_fadvise64_l64, posix_fadvise64); -#endif