From patchwork Tue May 12 10:34:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 38969 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0B3AB389780B; Tue, 12 May 2020 10:35:02 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 7BF98383F842 for ; Tue, 12 May 2020 10:34:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7BF98383F842 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jYSFV-0004pw-Rm for libc-alpha@sourceware.org; Tue, 12 May 2020 10:34:57 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jYSFV-0000cS-O1 for libc-alpha@sourceware.org; Tue, 12 May 2020 12:34:57 +0200 From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] aarch64: Accept PLT calls to __getauxval within libc.so Date: Tue, 12 May 2020 12:34:57 +0200 Message-ID: <87h7wlzbji.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" When using outline atomics (-moutline-atomics, the default for ARMv8-A starting with GCC 10), libgcc contains an ELF constructor which calls __getauxval. This code is built outside of glibc, so none of its internal PLT avoidance schemes can be applied to it. This change suppresses the elf/check-localplt failure. ----- sysdeps/unix/sysv/linux/aarch64/localplt.data | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/aarch64/localplt.data b/sysdeps/unix/sysv/linux/aarch64/localplt.data index 56f362d3a7..2c14b652ef 100644 --- a/sysdeps/unix/sysv/linux/aarch64/localplt.data +++ b/sysdeps/unix/sysv/linux/aarch64/localplt.data @@ -7,6 +7,9 @@ libc.so: malloc libc.so: memalign libc.so: realloc libm.so: matherr +# If outline atomics are used, libgcc (built outside of glibc) may +# call __getauxval using the PLT. +libc.so: __getauxval ? # The dynamic loader needs __tls_get_addr for TLS. ld.so: __tls_get_addr # The TLS-enabled version of these functions is interposed from libc.so.