From patchwork Tue Jul 9 12:58:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 33628 Received: (qmail 23445 invoked by alias); 9 Jul 2019 12:58:24 -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 23431 invoked by uid 89); 9 Jul 2019 12:58:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy=H*f:sk:2801f17, HX-Languages-Length:1846, H*i:sk:2801f17 X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2YSAjdk4SJI/XnV3CWaqihmMPWOYx1jB64Wxcp7WvcE=; b=XSEnD2Wo/QTCYo3mYrxd0eDtWmict4ZZn1DvCkM2zgzFdRWXhtIsYu3EestA4Qfe8XpG+i0uE/FoFFn+fa9LYZalzpyLiEMj91dnL83yXYX/Wjf4a9hC/vuxokomrjr8BIe1GV0ObI1HIGk9pK9CAvqKrlkinAIAxE84TgG07qU= From: Szabolcs Nagy To: GNU C Library CC: nd Subject: Re: [PATCH] aarch64: simplify the DT_AARCH64_VARIANT_PCS handling code Date: Tue, 9 Jul 2019 12:58:19 +0000 Message-ID: <190ebfa4-9728-28cd-4a63-316c773897b1@arm.com> References: <2801f179-5700-651c-760d-24ebb27dab1b@arm.com> In-Reply-To: <2801f179-5700-651c-760d-24ebb27dab1b@arm.com> user-agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs.Nagy@arm.com; x-ms-exchange-purlcount: 1 x-ms-oob-tlc-oobclassifiers: OLM:1388; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Szabolcs.Nagy@arm.com On 09/07/2019 13:55, Szabolcs Nagy wrote: > Remove unnecessary variant_pcs field: the dynamic tag can be checked > directly. > > I'll commit this tomorrow unless there are comments. > Then backport it with the variant pcs support to release branches > https://sourceware.org/ml/libc-alpha/2019-05/msg00523.html > > 2019-07-09 Szabolcs Nagy > > * sysdeps/aarch64/dl-machine.h (elf_machine_runtime_setup): Remove the > DT_AARCH64_VARIANT_PCS check. > (elf_machine_lazy_rel): Use l_info[DT_AARCH64 (VARIANT_PCS)]. > * sysdeps/aarch64/linkmap.h (struct link_map_machine): Remove > variant_pcs. > and now with the patch attached. diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h index 4f27637b20..9b2e0ffdbf 100644 --- a/sysdeps/aarch64/dl-machine.h +++ b/sysdeps/aarch64/dl-machine.h @@ -105,10 +105,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) } } - /* Check if STO_AARCH64_VARIANT_PCS needs to be handled. */ - if (l->l_info[DT_AARCH64 (VARIANT_PCS)]) - l->l_mach.variant_pcs = 1; - return lazy; } @@ -402,7 +398,7 @@ elf_machine_lazy_rel (struct link_map *map, return; } - if (__glibc_unlikely (map->l_mach.variant_pcs)) + if (__glibc_unlikely (map->l_info[DT_AARCH64 (VARIANT_PCS)] != NULL)) { /* Check the symbol table for variant PCS symbols. */ const Elf_Symndx symndx = ELFW (R_SYM) (reloc->r_info); diff --git a/sysdeps/aarch64/linkmap.h b/sysdeps/aarch64/linkmap.h index 7f801b14db..ba74fe10e1 100644 --- a/sysdeps/aarch64/linkmap.h +++ b/sysdeps/aarch64/linkmap.h @@ -20,5 +20,4 @@ struct link_map_machine { ElfW(Addr) plt; /* Address of .plt */ void *tlsdesc_table; /* Address of TLS descriptor hash table. */ - int variant_pcs; /* If set, PLT calls may follow a variant PCS. */ };