Message ID | f72f9d26fc9b104d375a77aefeb679af88b04d43.1699016830.git.szabolcs.nagy@arm.com |
---|---|
State | Accepted |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1022911vqu; Fri, 3 Nov 2023 06:16:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEC723+1hQa/NyQec0F+GgL/WEIyRc8NDbvfhQSLMStSZEwTbgUsHMfgQvHXVLhchlWWFAL X-Received: by 2002:a05:620a:51d2:b0:767:e993:5702 with SMTP id cx18-20020a05620a51d200b00767e9935702mr20062965qkb.35.1699017380302; Fri, 03 Nov 2023 06:16:20 -0700 (PDT) Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id m18-20020a05620a291200b0077a02a27b8fsi1555901qkp.354.2023.11.03.06.16.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 06:16:20 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=DpgeWwAM; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=DpgeWwAM; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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 1FAA2385697D for <ouuuleilei@gmail.com>; Fri, 3 Nov 2023 13:16:15 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2058.outbound.protection.outlook.com [40.107.6.58]) by sourceware.org (Postfix) with ESMTPS id 1083A385770A for <binutils@sourceware.org>; Fri, 3 Nov 2023 13:16:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1083A385770A 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 1083A385770A Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.6.58 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699017366; cv=pass; b=H6jnyUOr2OPPJDDrWYn9qEhxAX3UFQ/UFRVoYaZAqZyS9tLuMp6DfjRPuXkiDlY7dsWhCEiYjFfk9DZaYVcu5RK581shIDD05lyHrfm1WQIkL0HV5mfWvGWkfDjRCQh2yQT2SBBJIREoKKDrSFkuo3xB72nCCcThTyKhg2t4WsU= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699017366; c=relaxed/simple; bh=TqHTso9Po9RTFGMviMW5GXp5MfSPTZWGQGCLYH4FCgM=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=j1+A49oyHahKcFYQx4FT94W2WmdYoz1EvRjvCkGBNmEKqm2TBY3olEFnA+Wyd7IFc+raiIc900yQk2zPytSdgkHEOXatVAscxWp9m6sEnfuObE4u7GAxvuTdhwZYk8yWDrPo3FkoW3oSN65kcODx8qHtx2eB2aWbzWuZBQ5LgyE= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=nGs2raF1DzwV3ko5ufwQW4rCd8UjSY7USNNJTIJ8ijsSxjiaCwORcWvPwV2TN+OVxIjdohgYqKvDpiOl332OMEcvkX5zjgjVIT4diZhpr11QOSoXsWsAllw5h4eKmrY1BuYIkS61iGvLnIHuAA+5KA/kIBFogsvD39131zyKqDXsWXyCcrCLGWjehplTyyctyZKHLPBCUzVcOq6yKypj47YBj8DsQ+jtqYG0r7wj1eDl6CvpnRvUeqtwlZrff+UQlpupAE1bqECd30jCVfeVGTKwEixgqgz5aTxV5dQjLeVAEEEiiZakVnHhiR9icQDfBN4ow/y2s2R00NS6UsGoLg== 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=t9uX247KXXyBZPiOdFmU51wCR+urD4pU5I26eexcf/E=; b=llwTvbqwZ/WE/i6j0NzgidGXKhNzjeEC3PS4Q+/GS03M5T+n/kD7mFUoUU6lu1USJTXeDzmvsJfxzD98YCU9Q1QvLQKCx3vNNODJLM0HT1kAfJvXZuzcj5TQxv9N0ZhLNrMLyUizUX/WOxd8z0/awjPn1qgb68vis0zDoTk4VV+vsHlhKMJfnHWqlaj4jAer4b+ulhsNz+ME2ucukb96LbDgS9zi4E5bm6xljd85/z8mQOHMAaR5QZDzC2AfiywSK9LKW3XWLqOzQVtofT0qiY99JGgsYiAtYVYZ4HNC6FxwReqXuRfzyWbLDbjbwT8JYFZgDtwepY9AOomttcXyVA== 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=t9uX247KXXyBZPiOdFmU51wCR+urD4pU5I26eexcf/E=; b=DpgeWwAM3lcUxP5mDWGG6qgTHIKXmHgP8v+JMLOBREKwSQplK6dfmbSZyJKcJ7tezLuYmpZb8Uoy9NoZtgAPgO3/KiTu8iQQxGbB0p+leZZtlWgRaI2HBII6rnwsr0huZpCEmyYSuQLL2P5QX/YfeBbJAV19HlNE7q8eKpyWJUU= Received: from AS9P250CA0018.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:532::21) by AS8PR08MB6008.eurprd08.prod.outlook.com (2603:10a6:20b:29d::8) 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:16:02 +0000 Received: from AMS0EPF00000198.eurprd05.prod.outlook.com (2603:10a6:20b:532:cafe::95) by AS9P250CA0018.outlook.office365.com (2603:10a6:20b:532::21) 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:16:02 +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 AMS0EPF00000198.mail.protection.outlook.com (10.167.16.244) 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:16:02 +0000 Received: ("Tessian outbound e243565b0037:v228"); Fri, 03 Nov 2023 13:16:01 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4f4845eca05564de X-CR-MTA-TID: 64aa7808 Received: from 24b9de0efca5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 68C3EC06-DAD2-4604-94ED-C83262CFCD83.1; Fri, 03 Nov 2023 13:15:55 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 24b9de0efca5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 03 Nov 2023 13:15:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QWOGDcFi0bdUuwpbZwtdqcjWcEm+IooaApISwpulBEbXGZG+z5zM92d/iJwDdiKw3SJAgRI0IfxnoF6N1qMyHr09tXOg8BaU1kZxN9mCFGzCtH+LDf6QCcSvu7nOvbeTKiaGGRs6Xj1QfO3a7ZtGtuP9CuIGHo8LlSfrNPy8mO+D11j20/l5kO8IJzVzeZz93XThQSMtTSowHi2PZ2usl4VCVT7rX//0wQfjGBMwVu162oiHUVKiSP0T329F0exEz/R82PkQEag0IsVcWhpdhOdTPnWePndeu6dZtBijpXCdZgrMzBLAJf+K4zSVVyX4KxaTIKQ1OYD46mhmWgGLRg== 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=t9uX247KXXyBZPiOdFmU51wCR+urD4pU5I26eexcf/E=; b=h3E5hxL0NcVCQ5y+U4+oda+2oG+z95pw8R+mrLiVWwRCC492QmDnF+oS4R9wdZDRumgwR0v38IcJJuXc6INcLLhbPBngbamn6tlikLpXQ+KCSMXiXRaFaYtMecE0sF9dldPm1vMM9tbzFwUyouaBXQCRwJBVHrKG3g3UQhL5S7cUOEgW5PMvjvcurXzpadePW/EVBzEw041tnyQPsCAV+MzGuypfT7NPY4BmZ9IMLF7i64Iao840BgkLH5gyzyd+0UEWBhEAPzpV0Qp02JQy/lcvZj4IHlKMYgDVq65+829gn0tcFAdgYGclY626XgO6PY0iPv2oMX7waQBHj4nuKg== 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=t9uX247KXXyBZPiOdFmU51wCR+urD4pU5I26eexcf/E=; b=DpgeWwAM3lcUxP5mDWGG6qgTHIKXmHgP8v+JMLOBREKwSQplK6dfmbSZyJKcJ7tezLuYmpZb8Uoy9NoZtgAPgO3/KiTu8iQQxGbB0p+leZZtlWgRaI2HBII6rnwsr0huZpCEmyYSuQLL2P5QX/YfeBbJAV19HlNE7q8eKpyWJUU= Received: from DB8PR06CA0060.eurprd06.prod.outlook.com (2603:10a6:10:120::34) by AM8PR08MB6595.eurprd08.prod.outlook.com (2603:10a6:20b:365::11) 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:52 +0000 Received: from DU2PEPF0001E9C6.eurprd03.prod.outlook.com (2603:10a6:10:120:cafe::a6) by DB8PR06CA0060.outlook.office365.com (2603:10a6:10:120::34) 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:52 +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 DU2PEPF0001E9C6.mail.protection.outlook.com (10.167.8.75) 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:52 +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:51 +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:51 +0000 From: Szabolcs Nagy <szabolcs.nagy@arm.com> To: <binutils@sourceware.org> Subject: [PATCH 4/5] bfd: aarch64: Avoid BTI stub for a PLT that has BTI Date: Fri, 3 Nov 2023 13:15:50 +0000 Message-ID: <f72f9d26fc9b104d375a77aefeb679af88b04d43.1699016830.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <cover.1699016830.git.szabolcs.nagy@arm.com> References: <cover.1699016830.git.szabolcs.nagy@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU2PEPF0001E9C6:EE_|AM8PR08MB6595:EE_|AMS0EPF00000198:EE_|AS8PR08MB6008:EE_ X-MS-Office365-Filtering-Correlation-Id: da05a163-fb6a-4351-3978-08dbdc6f0735 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: VlVrYqfONLVQCtcrUojWK70afJfsw+y9getVnnYlLCthh/m1oiCC009nYlZFXawtnSAK/L2gL1V8EdxrrOC/xMPO9ABP8BeDOzBKEUn+PCTmxiidwrkJ45On7qX64KAs1BMmJGw1BMJZmz7N6VsoZhhR7+5oh5dEUZdES3V12LGPwA2s1vbxMKGh+t/CPh5OAAgkxk8UceYfIT4T3S+ZMbD/b6+4KbNDLzPBbl1MtQspunV9E01Cd+JfIoFDRzH3BekFLa69TVWM63J3fXu4fczcO0Q2A7aqpqOr5Aceul2ww0nGRM8P7nzrPOH/b2rEA1WK5X4sNVf7zI9GUun/MLNt8rJzvYiT9Co0hMwwIahFaZneebRZ1tnLvjujR5xxIre5TBUHkrKUl+cQdSy2OszOR7vKjPNRfgayvhJBQOmUVLL1OG/BFvryRtJiAzkpicgVSxnMN999IAFFMh5tbEqHq3JTC+nxOa19JPAESK8utmYY+GUQpUvf5Zr+Dvg8C/AbtGzLw0/Ov48Z+T1c6RyGY1yQskUQOvQPbcx2nKtSRdC7EiF/+Gs8EwhLXoKIjpKWkEpnNjvmHRDHFuIu537qs2tH3Ri80A9fmcRzO+iwYEtTJ8UwJHnVBwjD2bNaO86Ok17peDpWHibgRlkYb80/nUlqmly8RGiscnIU7m9xPJlJw2/kMuy4Z0vLIoABlBMA7E6OT87xnyftK4Xh0Kf8uZTkTdK6L6LiAFDc+xelgeCkGlz+RZddZ/MXBHuKx4HQIaRVfb9UaaD5fK5ntQ== 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)(376002)(346002)(39860400002)(136003)(230922051799003)(64100799003)(451199024)(1800799009)(82310400011)(186009)(46966006)(40470700004)(36840700001)(2616005)(40460700003)(40480700001)(26005)(6916009)(36860700001)(336012)(7696005)(83380400001)(2906002)(47076005)(478600001)(426003)(5660300002)(70586007)(70206006)(44832011)(41300700001)(8936002)(316002)(8676002)(356005)(82740400003)(86362001)(81166007)(36756003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB6595 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF00000198.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ad9bd043-a1f1-4a1e-2897-08dbdc6f0185 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zPfZGtD+GuJ32ULGJdHlvgG0X64ZRvVcv6YUDvL4xew9mGiwsWvNzzh0edvZNLlLaOjTB2uC5J6wd5l//6eDlO95rHN2Sf/RHZDm5COQHYmhI4wWra42jobUgGzIxvPGmlrhd56ArDvKoeMRzc4TFqsQYvNz1z7Pnk3f4kkETsNkJVz1rJs+seLwzVqtlAwHnu6y3n/ux94/0HNa3DxVt6JFww//L/EhUUt25E+Isabxwn4ZbS9Aoj2VBr3DsxcSveVql6D7j1B0LnmO82wkRYeH8epuKt3ffLzbGfuXzvAY/bQmH7BJNya6SiXShtsdOamwOSXD4n1YvLf2gsOaYqQ85NPiAbuo7FVmIIw4NhAMBwztO2UAi5/xnxfKTonb0NX+Zb3fqJDhAJT2MtIidoJ2dk0yf4effpoum7laWwc6BSgOFFocOB1yDM1Ym/lFjcWKaUMVUKwMqayT175hw4H3Cpd09ljr8ZEYA6gustPvKHAIQoWEFDDk6lPh/mPBSUzQ0Ev6iK8XPVsBUiPIpGh9rCzcpYQyipTp3rMjobAzDemOxYPpbfbB3nkDNEtnI8T0+ROt2KvRh4Phr1FRIbkhEO7mwqQiKelSGU46hLf8jMYv2JPelzv79hsZTpXMlXJNKbtHO5TXUrtUXSzUm7v4pwaCtt3cLwRIlbmpbnJOPejybi12Dd0ehFfDdRH7C1qMWOWRNdRS4ZkgHz9eBEgTiivl1pp3OXVAiUqEzGKy26IpUY1LXi1IumzS6V9M 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)(136003)(346002)(376002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(82310400011)(36840700001)(46966006)(40470700004)(40480700001)(40460700003)(26005)(2616005)(478600001)(36860700001)(7696005)(47076005)(336012)(426003)(2906002)(83380400001)(41300700001)(44832011)(70206006)(5660300002)(70586007)(8676002)(316002)(8936002)(6916009)(82740400003)(81166007)(86362001)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2023 13:16:02.2841 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: da05a163-fb6a-4351-3978-08dbdc6f0735 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: AMS0EPF00000198.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6008 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, 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 <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781548848511304684 X-GMAIL-MSGID: 1781548848511304684 |
Series |
aarch64 BTI stub fixes
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Szabolcs Nagy
Nov. 3, 2023, 1:15 p.m. UTC
We decide to emit BTI stubs based on the instruction at the target location. But PLT code is generated later than the stubs so we always read 0 which is not a valid BTI. Fix the logic to special case the PLT section: this is code the linker generates so we know when it will have BTI. This avoids BTI stubs in large executables where the PLTs have them already. An alternative is to never emit BTI stubs for PLTs, instead use BTI in the PLT if a library gets too big, however that may be more tricky given the ordering of PLT sizing and stub insertion. Related to bug 30957. --- bfd/elfnn-aarch64.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 3adece30250..4faf642b422 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -3675,7 +3675,8 @@ 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 (struct elf_aarch64_stub_hash_entry *stub_entry) +aarch64_bti_stub_p (struct bfd_link_info *info, + struct elf_aarch64_stub_hash_entry *stub_entry) { /* Stubs without indirect branch are BTI compatible. */ if (stub_entry->stub_type != aarch64_stub_adrp_branch @@ -3684,12 +3685,22 @@ aarch64_bti_stub_p (struct elf_aarch64_stub_hash_entry *stub_entry) /* Return true if the target instruction is compatible with BR x16. */ + struct elf_aarch64_link_hash_table *globals = elf_aarch64_hash_table (info); asection *section = stub_entry->target_section; bfd_byte loc[4]; file_ptr off = stub_entry->target_value; bfd_size_type count = sizeof (loc); - if (!bfd_get_section_contents (section->owner, section, loc, off, count)) + /* PLT code is not generated yet, so treat it specially. + Note: Checking elf_aarch64_obj_tdata.plt_type & PLT_BTI is not + enough because it only implies BTI in the PLT0 and tlsdesc PLT + entries. Normal PLT entries don't have BTI in a shared library + (because such PLT is normally not called indirectly and adding + the BTI when a stub targets a PLT would change the PLT layout + and it's too late for that here). */ + if (section == globals->root.splt) + memcpy (loc, globals->plt_entry, count); + else if (!bfd_get_section_contents (section->owner, section, loc, off, count)) return false; uint32_t insn = bfd_getl32 (loc); @@ -4636,7 +4647,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 (stub_entry)) + if (need_bti && !aarch64_bti_stub_p (info, stub_entry)) { id_sec_bti = htab->stub_group[sym_sec->id].link_sec;