From patchwork Tue May 10 09:58:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 12844754 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D54B6C4332F for ; Tue, 10 May 2022 10:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JJj+rvx3xDp5oMJdK3ooh1jhjYYrpZM5Jz/W6MiUdQA=; b=r63RXBdnE6Tk50 FpGA5tKXJ5efEL2XBOp9XdMlmI4dDnM/kn7yp8jCBNgp5jHRiVdiUi6Vn3bvOP1XQvsIiBtctsO9B Bg7YMtf5zsP9K0k/L4aGMLZPaKbRwjnwEF5tLMer53AaiygtKq5fXPSSgWRWVXAW2LZVMGsOMAI34 FEx0nwJt3ug5RX47YIR7YYzdhyjejH+dPrZabxjZ7KndN77BbTnMvtABPrQojRCL9XleuVp2o9+mQ Ut8Pwj17m0FSosuj290tsbkbtgwXWgR+B1A5o42Sx1U++yKErMA8kwWlOh5HikgIY7SvJ/jRMqHh4 hPuI+Ja+mYXlEtvrKAOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1noMe4-0011g8-8t; Tue, 10 May 2022 09:59:08 +0000 Received: from mail-vi1eur04on0614.outbound.protection.outlook.com ([2a01:111:f400:fe0e::614] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1noMds-0011Z9-Hy for linux-arm-kernel@lists.infradead.org; Tue, 10 May 2022 09:58:59 +0000 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=XjSGaTCpzNVr/jYkE27GcUnDaO4/BDfUO586NOsn6lPOqOVPickhcsOcpkDEBIp+/nHlRcHJxccweQt/kz7JzlgBiBjt91o0bdCL0w/kL4t9ilZ2tJ2ryuskJM5gpledcG8ohXfLsSq7yg6vrylcE6hmMUHPCp6Iqb1KC8gtENWvf5KGAwmCxIqG5fyGw/ik2rWjcQ4OWRqFzj8EuLsh08kycDzP56ns6HeN3lcmfImi7CcaUPJJUSbURzZQZyxKygbQgPVfsQmQWRMLrHcGxT9KkK8xlQgztTBqei49iDuQOsv8s5HpEkCoowsA/8KGUDA9GEeDbVQWoUresMENTQ== 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=ejCe3gZrl7ATn3+uUmaRRiirtRizgdux1RzZZZikJ9I=; b=nIA8MSEiec01BLufDDfM0Vg+7fwXtcAeqOLq1b65KfY6aSgr3dq4zBWVdUG7fILyFvuXVL18o8re1UPmZl3e57sVGKfGpE2l4K64pOyq5owBy12jZfRFXLHGNb6I7ajBxI3JXKdH5ajgaXyx47OoRV1a27Sa5vINf7G0pnP1sOth1zgSU5WBiUr06sAXaKDoPitdjXrmJ9sh4w7RHv4EBSgqcN9nnH88khWvKyIZbGSi04nM7BeUYPrjfiGJmlLCFiw+KSsOnwomHfMO3iceADAkQzgHprrXpHppeaMxBp8xNlYENKICbOtgmfivk2SZSq/VN4838YsOvvh9lpaprg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.infradead.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=ejCe3gZrl7ATn3+uUmaRRiirtRizgdux1RzZZZikJ9I=; b=yLvJlMAdp4Q8WP4v3hmFgk1zLCjEtGI1ai2JqMqUrbsCM6r8QBSpEVNSp2Qe6Z+8+AoJMbFJiVd05QuyXMH3QHtoPNqKfYc/hr6deul/9Vpa46sCHMvXhnA8oSrgJVpIb/dHN0xDsV6aV9qfahLLiSKtmM1Mr9FQx9os05X2Zlk= Received: from AS9PR06CA0025.eurprd06.prod.outlook.com (2603:10a6:20b:462::30) by AM0PR08MB4321.eurprd08.prod.outlook.com (2603:10a6:208:137::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.22; Tue, 10 May 2022 09:58:51 +0000 Received: from VE1EUR03FT011.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:462:cafe::d6) by AS9PR06CA0025.outlook.office365.com (2603:10a6:20b:462::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.20 via Frontend Transport; Tue, 10 May 2022 09:58:51 +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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT011.mail.protection.outlook.com (10.152.18.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.15 via Frontend Transport; Tue, 10 May 2022 09:58:51 +0000 Received: ("Tessian outbound 78191104f1b7:v118"); Tue, 10 May 2022 09:58:51 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 968b4c640b39473a X-CR-MTA-TID: 64aa7808 Received: from dc89c37a336e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A474F864-8C53-4C2C-8A8C-C2F3BB870EBE.1; Tue, 10 May 2022 09:58:44 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id dc89c37a336e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 10 May 2022 09:58:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fChAz3gF1k02F+MMfuTG+Ju52h/qiGCy5RZRgwFTRDHyTkxtZNA1UZLTYhaZw93C32d2KplWYgMmGCH16WR9dwKFNi4cW0qZeeKrdFwVsJgzghXrNN4FRNx/IKqBy3a52s02qechwrIr9GvTJe1jcObO0zGLkU2rprJ1XoB7zinmFhvM2Z91PkY+1kDz6KUpC1HHh2kOxn6k9BsWuVUWgXeBqPkZEOdKkHxEWpcXG9/qvzRVK679k/+//5uNpU6fR9UNeSDfLiyLn7FE3Vq9NtQ/l4bhWXCw0SFbwGKbZB0bVZwDVXmBChtNiVOjPc92r7lUlJLaBOAoQi28hsLsNQ== 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=ejCe3gZrl7ATn3+uUmaRRiirtRizgdux1RzZZZikJ9I=; b=Z1QABD4wZqyzHWxrDqm/k2Lz6LWkTacI3ozLFOrjVv/q4IK/bcNLcL6UxejM2v3/TvtoSdh0qmDUxMH5Zje+w+yP1GOzBtlDG4SKUezrqvs4wYmJoDxJ8mt3Z9ZsWcNgfRhvLwRGDde/aImtBOmOg3K1bAaz5VSCDDWzotrGsIIPVOrJMO/e20z0T9ge6ev5fRzyNtWuL6nn8VxctjkRPEWaWjhh+THMg2ILWLiYdk1+/NsuDZ6gzKoGyc/6ypgu4sdloKUVXpB5MHdCj0SXfgJboJ38z7iiiIADQlvPRgPzqqKqM9N7ADilsLvVXtIPchpPn99oDLgAZCMtOFsM0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.infradead.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 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=ejCe3gZrl7ATn3+uUmaRRiirtRizgdux1RzZZZikJ9I=; b=yLvJlMAdp4Q8WP4v3hmFgk1zLCjEtGI1ai2JqMqUrbsCM6r8QBSpEVNSp2Qe6Z+8+AoJMbFJiVd05QuyXMH3QHtoPNqKfYc/hr6deul/9Vpa46sCHMvXhnA8oSrgJVpIb/dHN0xDsV6aV9qfahLLiSKtmM1Mr9FQx9os05X2Zlk= Received: from DU2PR04CA0276.eurprd04.prod.outlook.com (2603:10a6:10:28c::11) by VI1PR0802MB2542.eurprd08.prod.outlook.com (2603:10a6:800:ad::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.18; Tue, 10 May 2022 09:58:42 +0000 Received: from DBAEUR03FT024.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:28c:cafe::e6) by DU2PR04CA0276.outlook.office365.com (2603:10a6:10:28c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.23 via Frontend Transport; Tue, 10 May 2022 09:58:41 +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; Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT024.mail.protection.outlook.com (100.127.142.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5227.15 via Frontend Transport; Tue, 10 May 2022 09:58:41 +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.2308.27; Tue, 10 May 2022 09:58:46 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.27 via Frontend Transport; Tue, 10 May 2022 09:58:46 +0000 From: Joey Gouly To: CC: , , , , , , Subject: [PATCH v5 1/4] arm64: vdso: put ELF related sections in the linker script Date: Tue, 10 May 2022 10:58:31 +0100 Message-ID: <20220510095834.32394-2-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220510095834.32394-1-joey.gouly@arm.com> References: <20220510095834.32394-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 084a4cf1-8ce7-4139-2399-08da326bafa1 X-MS-TrafficTypeDiagnostic: VI1PR0802MB2542:EE_|VE1EUR03FT011:EE_|AM0PR08MB4321:EE_ X-Microsoft-Antispam-PRVS: 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: XvBi/FeUvDeL5cspg+uzq9zUowrFZKd0QplqB7C07gBvuRcDex1ii7bspr+WfRyrr6Zj0uvqwof6FH5uTMhYzVmgwAHjBE6HwoqBOhRVKa2vdsRdHqjyc/f2irsO894uQ76M6hof+p970/F1dGuyP2k5BGqZ+X5IByZUpnaJ0TuTOYr1wwQrKiQ9OLqvCugehIpY5RDYj9strVTFeT4yCzEAbA2J2D7Niftz8JcU8VdgOJzuuhT3FbuHIRbObivpIF/1guMAyWOG+vkW/OVN7tVTgoh0I2z3FNdY0Zq2T6a5yTTb/CsteMF2AchTy1QWlKMKCT1uxlV6wJgxMZq49Svhw2/yIpiDoss4dt5Rz+ghzsq7VV5nFaG5cW7I6qnR6sT0PaD30REAoe4Sja3Av4CGvQ67a8TBnM7WQ4YRB8ciedtGAqyk1r4fiDkm9Ya4sT3kp7np6TlqjQ31CMlzbO7tjtmBuLOsg9uhU5y0iK0BSPvx5BoTebXZmPo28dCGW7TCWXx7mS+Slvl77cuFpnyOtykLUBgWR1jB3EBk0QgeEqnJiKy5v3hVyXMWKptazbwOgdPkTQ+sYmxFC8RGB+6GUGBnEqgpZxvEodLtOI2tY/GUyFeLpksaIv+5Q5aVOeynlEzX2N/SwrKZp89fLav/flLRSAtq8rgDi0jrA36ixiLYUArd+Vp2DkkvQVpkP2GkpKPcvgWADLR8PwdbXA== 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:(13230001)(4636009)(40470700004)(36840700001)(46966006)(70206006)(8676002)(70586007)(36860700001)(316002)(6916009)(8936002)(4326008)(5660300002)(2906002)(54906003)(36756003)(44832011)(26005)(336012)(508600001)(1076003)(2616005)(426003)(186003)(6666004)(7696005)(40460700003)(47076005)(86362001)(82310400005)(356005)(81166007)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2542 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f9fc8961-69f9-41cb-6a7b-08da326ba9e4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OBAtdSuyVriRY5GwDIIsnGQJ/iAKmCrPjBNOkXuHR2tvAvjt2H8B/28GNmmeKxjyBy0V6KvjyRmUoJCbWFJNEN6fsF4zudRw+M8aG+gIPPN4r/WL2vNOaWfQmq5BifzxrTVw6mktQkArZOoQep1w1DxOQDmfy+pjMMnV6f0LPyW80XWNjqwziefqHRmePQnfAMeiB7jUrB28emzbM5NREJ4f6cVlESS/clzl6qyermS/cyduZPoF8ziH6xH9pMpoMokeBTwnjW7DSVpY4D1DVz3t9y95f4RKg12mlqzUpaqk0MRn7WPIAYsBVHyO6FhjdzaJQ0p6ykWJFVKjolWfAPkySfmn37g+Pj1Ry0/4lN31UftOhs+BOf11DPbIHlNn+JVNkG1D4Bj8255XRIcsszMAhHnI6LQsNA2gb/7eUWqicRQh+lyQQXlCe400qgLSgHDpFC9RRoMlPsmsu5agk05iKIqCmRM9qhGDjRriAnY6YIufbrPXGXA8V8sjxyDhJP/vrQrrAymVd9QtK21xiWbaaCgq4jcUeYQIg7IbQnB42ngveowjuhFIVhM6N5YuM5QK/F9bnJNT8g+Xc7k6lG5NiFeRmslhLEAH8BJgA7CkQ0wSM4Bpk4/xXvnqpKyMpXkl/MY7lLu88ZbQvYfdu3IVbQKKuxTpmPmHXUU6wjOz1leuw0u6cf93lLGLKFkV 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:(13230001)(4636009)(36840700001)(46966006)(40470700004)(82310400005)(2616005)(36756003)(44832011)(81166007)(8936002)(70586007)(70206006)(54906003)(4326008)(8676002)(6916009)(316002)(107886003)(426003)(336012)(40460700003)(47076005)(36860700001)(508600001)(26005)(2906002)(5660300002)(186003)(6666004)(1076003)(86362001)(7696005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2022 09:58:51.4715 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 084a4cf1-8ce7-4139-2399-08da326bafa1 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: VE1EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4321 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220510_025856_641869_47C54854 X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use macros from vmlinux.lds.h to explicitly name sections that are included in the VDSO output. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Kees Cook Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino --- arch/arm64/kernel/vdso/vdso.lds.S | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S index a5e61e09ea92..1cd85258c079 100644 --- a/arch/arm64/kernel/vdso/vdso.lds.S +++ b/arch/arm64/kernel/vdso/vdso.lds.S @@ -11,6 +11,7 @@ #include #include #include +#include OUTPUT_FORMAT("elf64-littleaarch64", "elf64-bigaarch64", "elf64-littleaarch64") OUTPUT_ARCH(aarch64) @@ -49,11 +50,26 @@ SECTIONS .dynamic : { *(.dynamic) } :text :dynamic + .rela.dyn : ALIGN(8) { *(.rela .rela*) } + + .plt : { + *(.plt) + *(.plt.*) + *(.iplt) + *(.igot .igot.plt) + } + + .got : { *(.got) } + .got.plt : { *(.got.plt) } + .rodata : { *(.rodata*) } :text _end = .; PROVIDE(end = .); + DWARF_DEBUG + ELF_DETAILS + /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.* .sdata*) *(.bss .sbss .dynbss .dynsbss)