From patchwork Mon Jun 18 18:07:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 27910 Received: (qmail 101620 invoked by alias); 18 Jun 2018 18:08:25 -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 101605 invoked by uid 89); 18 Jun 2018 18:08:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, SPF_PASS autolearn=ham version=3.3.2 spammy=suffer, arguably X-HELO: 9pmail.ess.barracuda.com Date: Mon, 18 Jun 2018 19:07:50 +0100 From: "Maciej W. Rozycki" To: CC: Alan Modra Subject: [PATCH 2/2] libc-abis: Define ABSOLUTE ABI [BZ #19818][BZ #23307] In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 X-ClientProxiedBy: mipsdag02.mipstec.com (10.20.40.47) To mipsdag02.mipstec.com (10.20.40.47) X-BESS-ID: 1529345280-637138-14484-104370-2 X-BESS-VER: 2018.7-r1806151722 X-BESS-Apparent-Source-IP: 12.201.5.32 X-BESS-Envelope-From: Maciej.Rozycki@mips.com X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-Orig-Rcpt: libc-alpha@sourceware.org,amodra@gmail.com X-BESS-BRTS-Status: 1 Define a new ABSOLUTE ABI for static linker's use with EI_ABIVERSION where correct absolute (SHN_ABS) symbol run-time load semantics is required. This way it can be ensured at static link time that a program or DSO will not suffer from previous semantics where absolute symbols were relocated by the base address, or symbols whose `st_value' is zero silently ignored leading to a confusing "undefined symbol" error message at load time, and instead "ELF file ABI version invalid" is printed with old dynamic loaders, making it clear that there is an ABI version incompatibility. [BZ #19818] [BZ #23307] * libc-abis (ABSOLUTE): New ABI. * sysdeps/unix/sysv/linux/mips/libc-abis (ABSOLUTE): New ABI. --- Hi, Arguably the "ELF file ABI version invalid" message could be improved too, e.g. I think "Unsupported ELF file ABI version" or even "Unsupported ELF file ABI version, please upgrade `ld.so'" would make it clearer what is going on. But that's a matter for a separate change. OK to apply? Maciej --- libc-abis | 2 ++ sysdeps/unix/sysv/linux/mips/libc-abis | 2 ++ 2 files changed, 4 insertions(+) glibc-abi-absolute.diff Index: glibc/libc-abis =================================================================== --- glibc.orig/libc-abis 2015-05-20 23:10:30.000000000 +0100 +++ glibc/libc-abis 2018-06-16 20:03:55.899525111 +0100 @@ -46,3 +46,5 @@ IFUNC powerpc64-*-linux* IFUNC powerpc-*-linux* IFUNC sparc64-*-linux* IFUNC sparc-*-linux* +# Absolute (SHN_ABS) symbols working correctly. +ABSOLUTE Index: glibc/sysdeps/unix/sysv/linux/mips/libc-abis =================================================================== --- glibc.orig/sysdeps/unix/sysv/linux/mips/libc-abis 2015-05-20 23:10:47.000000000 +0100 +++ glibc/sysdeps/unix/sysv/linux/mips/libc-abis 2018-06-16 20:04:29.888042455 +0100 @@ -14,3 +14,5 @@ UNIQUE # # MIPS O32 FP64 MIPS_O32_FP64 mips*-*-linux* +# Absolute (SHN_ABS) symbols working correctly. +ABSOLUTE