From patchwork Fri Nov 3 13:15:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 161300 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1023750vqu; Fri, 3 Nov 2023 06:17:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGgnt94aVsVcug08Hoyod1FFDH4YvBNaDkZrYdgZ/0HLJYPeqr5E20GQ2qXX4wp3HOjEHNQ X-Received: by 2002:a05:6102:30b5:b0:452:6d82:56e3 with SMTP id y21-20020a05610230b500b004526d8256e3mr1274246vsd.6.1699017424595; Fri, 03 Nov 2023 06:17:04 -0700 (PDT) Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id cd34-20020a05610241a200b0045b64006152si210460vsb.316.2023.11.03.06.17.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 06:17:04 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=YmyFD7s4; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=YmyFD7s4; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 92875385C6F9 for ; Fri, 3 Nov 2023 13:16:38 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2082.outbound.protection.outlook.com [40.107.8.82]) by sourceware.org (Postfix) with ESMTPS id 4EAE23858C00 for ; Fri, 3 Nov 2023 13:15:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4EAE23858C00 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4EAE23858C00 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.8.82 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699017350; cv=pass; b=eSg8YePM3V07gJbGrQ4kh0VBdDE8/ckTlKKsXmWREAMWb8RMS0tULOxs3vEeaJInlycRgs2vfbOrFfSYHibbpnkF308cV+WHvB0ack8J5aKW2TLo69BNMy3mYWI70awY26e5pY90HM3mir52B0Y9CEesC6ktpbULPHXGLB4Ke94= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699017350; c=relaxed/simple; bh=tdgWrjgotN837Gndd7dcNO9sl+6ZufLeSdKj4Lo0pIQ=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=A9Y6Ktd2HbA7rDAkEkXQ+ydmg/GXElO+A2lXQbI14xXlZ+EVeOFfVjzZE/vYJgweUbKnOja4Lpt0WgkcWij8NG94LzOofSyIIVhooV49kdUkDeoRYo9+9+bt5hCeWpU2mdacLL9OaN0WSjvEsu6AG13pssUxpcLfJd2qeDYqlm0= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=GVrIUKb+WfmrnineubE2jQRmcRqSMYfWPLH6ikgkXTDTdeSxE9H4ATzVZvCq0YJ9mcSI4rDx3yvOkihRhcpLVD+4PE4EZNmKhnKOpEbGyeHF3DrQeQNaDBSHnjJ0oC72FAU/aGH9ZrGdc1t8diRZMQ+XK1B7Gti/2Nn8LlaFlLawUE5sQUESRwIvLfE68AvF8MH5oLONu44DJoMRQdaOvpbBBM9EIYBJH6tJgMOovmuIzT17kfS/GvWPMAwnuPy5OzSwCUfbhskSONNLVO4sMT5PY5V6X5pC1GA8br0xm75UD94WE02eSLigCaRWVDvUJmz1OiiTSyx93GA+WyR0gA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5JjZl4PwQzazI/JBo6FXhb5hck+jQTb4psWpo7OCtx4=; b=OEI4cyr2zGXmBYH5YJuNQq1xUMhHB+tF0InE2c9ORAEBgJPt6EBmjPLtIvXHPiKaEBJq362C2qU0+/MevZY0sHhSGZxcRtdxcD7SORY70M7kNvCrtyF+qZqPvMAriIbVqJmrTPQnU7YC1nXYNOB3PHSLBqD59WwbYms57oYwDt4tgUh/gWgZCRRzzkwmz1lELpajP7QWiIwir6kAGLFk2Zwo0kyqDB/sqYhByAMoXAse+lrr0tg7YmWyvcfiWebd+mUd+A87S6DvoMdKN3y+xi0XUkp6FsJxa1XMqVUbT/NAvNygQZ/oii4pV1OG+wFkf7v3w06utiUsCyKGtYA5tg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1, 1, smtp.mailfrom=arm.com] dmarc=[1, 1, header.from=arm.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=5JjZl4PwQzazI/JBo6FXhb5hck+jQTb4psWpo7OCtx4=; b=YmyFD7s4T3OAgRM6EWkn/lTmJWJaqbrRJQpoUk2S73rnxO7t2jQVxEURxorHLGlVdj+7mtuLlaxx+W0AbMBGSaAEH773RvfttJsKx6e2lx5/by4tM2SZz2TH90ppIzkFubXy0QrM/Bqzv2F2KPYGKVhXwD33ONAfturUhpEZ73c= Received: from AM7PR03CA0009.eurprd03.prod.outlook.com (2603:10a6:20b:130::19) by DU0PR08MB7518.eurprd08.prod.outlook.com (2603:10a6:10:312::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.20; Fri, 3 Nov 2023 13:15:43 +0000 Received: from AMS1EPF00000043.eurprd04.prod.outlook.com (2603:10a6:20b:130:cafe::f8) by AM7PR03CA0009.outlook.office365.com (2603:10a6:20b:130::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21 via Frontend Transport; Fri, 3 Nov 2023 13:15:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS1EPF00000043.mail.protection.outlook.com (10.167.16.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19 via Frontend Transport; Fri, 3 Nov 2023 13:15:43 +0000 Received: ("Tessian outbound 5d213238733f:v228"); Fri, 03 Nov 2023 13:15:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 19e33c0185d13228 X-CR-MTA-TID: 64aa7808 Received: from 04e3580d0aba.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FA7FC1E7-402E-4049-9FE1-6D508BE70BE7.1; Fri, 03 Nov 2023 13:15:36 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 04e3580d0aba.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 03 Nov 2023 13:15:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y107Jdtn/uTv2nTUKj1vRvx7tXYp9ePHd9IYM9N2nwmosB5SnIK7Zzamb0vQnXe1ZuG6ZRbjzlB88Tv2OQbPjEEbm9n4CIfWPs4Cdo905zQodYxqBvi/dA67tBrqLbXrOBFkdhtQAip+p7RP4ISIf1xnrF1dTCtt94oWu2aufycJILbJzzR4l3y4l1WnVQMvYkM5LjPPKRayc5qLE81SDHxYoRIgpIGKAz2O7f3RSSDcfEd5BNtKAJVJQTxhJYS3Ape1X4ho7Np6eQKZeH7QgdMvLrmWTKclRYmvagHV7lrmNuDqg/QmifOcgRYDHkNSndnNGHjmdLldjqJgS7WkxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5JjZl4PwQzazI/JBo6FXhb5hck+jQTb4psWpo7OCtx4=; b=IUXHjFCnYPDhmmaDyz05rW4K6JkghcbsF7YpK6VUqfE3s8gMx9zB5U9FcbJnRs7qGxmt3/TXAhJgT9znf+h9edJbrpfvMh/xGXrYV2I8AsAbDOU3gzDg/RPhLHB6I/YJUjZuGanb0XDBdZ67UsSaAXcTvBYtjXgzdaNRribtGYhSc6i4gMqoc7pU5Ro3x36Nbs51hPreirj9kzLtWktnVfg94j9p3FpK3S9bYrHolHMXWlkxNr9Qn2caQKZAE/NUl6eR604AGImXcEtfbENKwPei6Bw/cNkxSJjFFeL1I/MxUvnkUuOOn8JSqgwCF84ANmA8wjZaJokJKzf2eE6Thw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) 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=5JjZl4PwQzazI/JBo6FXhb5hck+jQTb4psWpo7OCtx4=; b=YmyFD7s4T3OAgRM6EWkn/lTmJWJaqbrRJQpoUk2S73rnxO7t2jQVxEURxorHLGlVdj+7mtuLlaxx+W0AbMBGSaAEH773RvfttJsKx6e2lx5/by4tM2SZz2TH90ppIzkFubXy0QrM/Bqzv2F2KPYGKVhXwD33ONAfturUhpEZ73c= Received: from DB8PR09CA0026.eurprd09.prod.outlook.com (2603:10a6:10:a0::39) by DB9PR08MB8652.eurprd08.prod.outlook.com (2603:10a6:10:3d0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21; Fri, 3 Nov 2023 13:15:33 +0000 Received: from DU2PEPF0001E9C2.eurprd03.prod.outlook.com (2603:10a6:10:a0:cafe::96) by DB8PR09CA0026.outlook.office365.com (2603:10a6:10:a0::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.22 via Frontend Transport; Fri, 3 Nov 2023 13:15:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DU2PEPF0001E9C2.mail.protection.outlook.com (10.167.8.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6954.19 via Frontend Transport; Fri, 3 Nov 2023 13:15:33 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Fri, 3 Nov 2023 13:15:33 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.32 via Frontend Transport; Fri, 3 Nov 2023 13:15:32 +0000 From: Szabolcs Nagy To: Subject: [PATCH 1/5] bfd: aarch64: Fix BTI stub optimization PR30957 Date: Fri, 3 Nov 2023 13:15:32 +0000 Message-ID: <8789cd1a77dfb39f2e8f722f6c737119e8cc9ae2.1699016830.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU2PEPF0001E9C2:EE_|DB9PR08MB8652:EE_|AMS1EPF00000043:EE_|DU0PR08MB7518:EE_ X-MS-Office365-Filtering-Correlation-Id: ef495bc4-e99b-49af-3139-08dbdc6efc00 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: KtDoz2RLIVr8XUcnPUgJLXynWaSCM5pM4g4hlPdcj83/mRG6YC21BpXzZgE5BdRHysYgqDH/inFO/nURDTKBuhE3SoGgrOr0EPWolBOmivbsH89iAuKYnPI6g/ewyjmT5H0JglAMVxPJdEcNyj6fHp8o4soTxgdw2rasx5/2+XTonBw4OyhiPOpGhM3V+0djS4ooMTPOfsE1RBdKXQHUlRIbZKt2rTWf1HQnM1fHE7Uw0V9eFYGKBitZ1J9yuhUsW0/48AAmBTeYO0pTS0lqAEWghmMLhqwZrGDI3+xw0s/XGP/mLFpEHOV2mX58SZ3jNU8V0stz7eolzgI+IPnolrPe+wM77736aJH0faffVMZg3+fz+WyuyzNCeznEruIWP6vPH7ieXAEWKdFxWojleT+p/2BcYha6iRUvSOSvnl1EnxPwfOuhDaGvzD/mCMSuCAV7krqZCwa9fK+WqnRIMaEwsJFH1QE31Sgw3efkoqf9XDYdjWpqZ5i/XQ0NDgTY+qNIW/e0xXmrP82hPUhr58xvylAWYpt2+PpBgSWEHW+UD5tyYhkGsPZYwNcGcn6qwEelCeu9KJQPj1ht+0kNPYMWCavyg7iX3foGba2T1B1erIpbb6Ym8XAr7vGvmpM9bvPFfZVqz+RmUpXL4ax079CDZ5UJ1tVOHAI3D+S8k4e5yeYYaixVnWjKNVB+obWTGq4HdVgQjOSSUBGeK694+GuMqko42H2tEjv9tjJyhX9/6WNdIT7jWYYU4xgYc7jzo1VVNL8aU1IwC5xDhVGWlw== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(396003)(136003)(346002)(376002)(39860400002)(230922051799003)(82310400011)(1800799009)(64100799003)(451199024)(186009)(36840700001)(40470700004)(46966006)(40460700003)(426003)(336012)(26005)(2616005)(7696005)(478600001)(47076005)(36860700001)(83380400001)(8936002)(5660300002)(2906002)(44832011)(41300700001)(70586007)(8676002)(6916009)(316002)(70206006)(81166007)(356005)(82740400003)(86362001)(36756003)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8652 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS1EPF00000043.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a1541738-ebf6-449f-6605-08dbdc6ef5fc X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pg3eASgrYoGaE0UPh2Ds12TCV0G4jmZaiBCCUPD+zt+m2qr+vTVi4tv4iywokyILcydOdmn3ywU3A0y6dWojCyS+l5w399yEvsS6Sj3sNNnweD0e28gHn0MsfEYtXXPIwm9dLf4vlUr57Bpu/JPtVa5t4PN5EFiNQ5jku7q3isMsUEkUssYJbZatWGPc88Gfk9datnvFxcSzphRSgON2kTzvNcyHxP3Y/5ucR0VZ3FWGGWsZjhhpp9zniAGcL34iLPk3juu5p9dB/tBoFvyE+QIH6Jdqv9bsLNNZaz0aG0OiTaxpBhOWTvqqYyk8aYHElgFE5cYinTNhYU6nj6kbUS0O+2ZQ4dz6jiCiWqHAykycsLRJVCWcKxVseNv29SsSFc92JKSLDLnYBMXc0QbUyesmCyWBQjajiKe3URTA4cgOiwAfzB+WVNGyRI0cdqf36R8RHWT6bW00Z7dNYairFNphMgRGtKjalyAbQUfYA5iMW3Im60TuvVchjL3OAffm3ddl5xVGa5z+0r+tkuUJO0iVWJ3K2U/URJgpfUViSVFre1KxhVGLOwT2FnIGeB8Ed4Ne5ZXMnxNvknFkRyCgQ7QRGKKnl1xkooetfmTGuA5HkLlsUgXnHJrdnTAEZQemPg5wkcdUQAH1qBigUpx/IYZhrOaCM5suVqDtc6MZta4SZc0A6s8khsSJJbyVrjlZjf6p1k8x5v6uQB7qbnUlvkUMA177RVuHYtOS4ANlwMwBY5UxDthOMttF0IZV6wVB X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(396003)(376002)(136003)(346002)(230922051799003)(451199024)(64100799003)(1800799009)(82310400011)(186009)(40470700004)(36840700001)(46966006)(40460700003)(316002)(336012)(2616005)(426003)(7696005)(36860700001)(83380400001)(2906002)(44832011)(47076005)(8676002)(41300700001)(8936002)(5660300002)(478600001)(26005)(70586007)(70206006)(6916009)(82740400003)(86362001)(81166007)(36756003)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2023 13:15:43.4972 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef495bc4-e99b-49af-3139-08dbdc6efc00 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF00000043.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7518 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781548895238228065 X-GMAIL-MSGID: 1781548895238228065 The instruction was looked up in the wrong input file (file of branch source instead of branch target) when optimizing away BTI stubs in commit 5834f36d93cabf1a8bcc7dd7654141aed3d296bc bfd: aarch64: Optimize BTI stubs PR30076 This can cause adding BTI stubs when they are not necessary or removing them when they are (the latter is a correctness issue but it is very unlikely in practice). Fixes bug 30957. --- bfd/elfnn-aarch64.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 4592bd6da27..a0dd17faa7e 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -3675,8 +3675,7 @@ group_sections (struct elf_aarch64_link_hash_table *htab, /* True if the inserted stub does not break BTI compatibility. */ static bool -aarch64_bti_stub_p (bfd *input_bfd, - struct elf_aarch64_stub_hash_entry *stub_entry) +aarch64_bti_stub_p (struct elf_aarch64_stub_hash_entry *stub_entry) { /* Stubs without indirect branch are BTI compatible. */ if (stub_entry->stub_type != aarch64_stub_adrp_branch @@ -3690,7 +3689,7 @@ aarch64_bti_stub_p (bfd *input_bfd, file_ptr off = stub_entry->target_value; bfd_size_type count = sizeof (loc); - if (!bfd_get_section_contents (input_bfd, section, loc, off, count)) + if (!bfd_get_section_contents (section->owner, section, loc, off, count)) return false; uint32_t insn = bfd_getl32 (loc); @@ -4637,7 +4636,7 @@ _bfd_aarch64_add_call_stub_entries (bool *stub_changed, bfd *output_bfd, /* A stub with indirect jump may break BTI compatibility, so insert another stub with direct jump near the target then. */ - if (need_bti && !aarch64_bti_stub_p (input_bfd, stub_entry)) + if (need_bti && !aarch64_bti_stub_p (stub_entry)) { stub_entry->double_stub = true; htab->has_double_stub = true;