From patchwork Thu Aug 25 10:20:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 12954486 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 3D696C28D13 for ; Thu, 25 Aug 2022 10:22:18 +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=kJBpVpraQOJKaF+sxNMei7lT5ufr8JBJrGFFrEIu/eU=; b=y4VYnBc5QP2kYn zsNo301Azb04mwX6OyvJSk1af5cefupnB2bL2zTiN2lLBdlBrkadHjN3J27ApVIUrUCCWwoTDan8L cmbfvdT1vRDQbqqfUjPQDFScmg9/xUPxlKlxQ/nwMYhfr1a/rqBAHV4i4YSqn7gM5SUBlnK5W58Tk 7y7H57NFw626jtw5BOEoS7DkXhqxXs3v/I2kBmWzZY2Z14Y5r1DLh5UeZpoi6kggpJkBOLFs1E5F1 S3VtvEW/uGZGNj7vqbs+coIVAN10EhLpuN3qPux62JfqR2QVhjTng4aPIxapJ2ic0B2PecZ3dhxJL Lj6jkskJCaq9uCfh1h0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oR9yp-00BoyK-Mu; Thu, 25 Aug 2022 10:20:55 +0000 Received: from mail-eopbgr10074.outbound.protection.outlook.com ([40.107.1.74] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oR9yk-00BovW-Eh for linux-arm-kernel@lists.infradead.org; Thu, 25 Aug 2022 10:20:54 +0000 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=AE9/88rhqS9Y7lyRIHR5UbKpOw3w4gjX0+K8O9eJX2oNDEakkZyWprdVgfCufXq0U0lHqsBiQS/vxkQWZV140Apx2IUUVZSWXtTXmQ5687xkLRR4Zxtc2j4jpCWk0qlD6EIEgXnVzaX+7flDcGxcMR20aybHgJqziDhJ4tlTglBTSD/8qAyO9QmaWQ9gBgy2XvW+PGcMW362617AXCuA9LWmxwb8Y4MpWyWtXwgRgGXV3s7c9WmvGVSOpHXGAIxnp/Cbg0nsT7Dp8Gew5LIbmWU8hXOI8cUVX3Fid6M50MyTEmphokNxUDvgp8BaObkKmpwWI8xdZefO0nF9yxKG1A== 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=SXkn6rfiWWr5ESJ1K0yJAhpOlINgZ93RrpKL+3Ii9a0=; b=aXTEWh3m+E9bQoDXyHvPIZ5gjaRa/aNV1J2m9Ty+WyPU0Prrd7L6z9ZcE6H9aVBsvhIDSN8lnq9gjsOYu2wNSmv0AONB+pnpTdt+ToIL8gE2mpTx2rpKSiJCgqQ946AOH58aQcUgK+/DMhcHH/dLEG49vVhUWWzfkaGfg+XvKJTFWkSft1OsYhwCbwkd/SPjJxVDhmyd8p9/ypdbC60va3ZlpBj7wncO/PuQi+I+GAjfYM3VVqkyedvu8oYW8q/u/yG5mbrFGH9R0roz7+0nJZeCUBlVsZQne5IGIFYx/oUu+lSVshHuC8YAdb5Cs6X8hj4oir89CzJNzShIixl4EQ== 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=SXkn6rfiWWr5ESJ1K0yJAhpOlINgZ93RrpKL+3Ii9a0=; b=4zahZ0rD15k2BbjCL7IrTji4vxeh2zhdvM2CGdfUJypS0uZOsg0Xvyf+3KEXJ/LW0Q4+qSAQuDcC3emSHttkKUBEuUeqER1iiugDCR86Q8PJCxegyeweEwbNRej2xGWvgf5pOkjW2lyO4TV6Qen1oNIbT8qd1g6UBZHNTV4DtFk= Received: from FR3P281CA0118.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a3::13) by AM5PR0801MB1666.eurprd08.prod.outlook.com (2603:10a6:203:3a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Thu, 25 Aug 2022 10:20:43 +0000 Received: from VE1EUR03FT060.eop-EUR03.prod.protection.outlook.com (2603:10a6:d10:a3:cafe::98) by FR3P281CA0118.outlook.office365.com (2603:10a6:d10:a3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.3 via Frontend Transport; Thu, 25 Aug 2022 10:20: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 VE1EUR03FT060.mail.protection.outlook.com (10.152.19.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15 via Frontend Transport; Thu, 25 Aug 2022 10:20:42 +0000 Received: ("Tessian outbound c883b5ba7b70:v123"); Thu, 25 Aug 2022 10:20:42 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 72efe971f0e38554 X-CR-MTA-TID: 64aa7808 Received: from c2a0128939bd.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5F48FB44-C6DA-43C0-8BBF-C153D009F23D.1; Thu, 25 Aug 2022 10:20:35 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c2a0128939bd.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 25 Aug 2022 10:20:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ImqR0Qaidoj+rrkyNcNhRdjkwaPitZ1CUyPKjP0A1iFCak5eas9sQZDt4H+mzFeh07w+SYOcGcF6LyS/VBXikiHrFJdV9kHwtqcBn3YzNeyHe0qmLk7KRQDWOtSCPSp+j0IpZ+QPkN6kVyaAIctBYCrfr1hVQkbxsW+fPEFjqHIlRyzxTQ1J4kiRDp6lUgm5o+7kx5+cD4syMV75wkFOwVdEZM6uttZqgEu/B1gJGjoUUpym3NDhW8ETox/a93mQMxO1Oi4JozMe+NLF0x+pY15dQmno/KAcBFHqD0m/nUhFq7LXTqn3ijXjCZZrC4kqrQrl/9pSY38hWBsR2vQH7A== 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=SXkn6rfiWWr5ESJ1K0yJAhpOlINgZ93RrpKL+3Ii9a0=; b=R+0EpU5TLBXAM7cyCb+liNVzvZGZRh08NX8Rrct6I57jKiIZrpe5PFkLRoYf5ZVjDX1jsr67khRrKxLIo9YhUTa90wV0VC6VwW8xpcJD3OVQpxirnSzm/8NNRvlLKUlxScrdhMIFbU2thdnj5yZaB43MxxRi/jPyAsm+fdA2EyEYCtDjCvH8ZHIyTxc7iZbvgr5xlR2yHcJX1fr8TjaJwpOL9K3/rYQIWKZNNz6SPU+fY2JbeibBUOaRLzg2dlAtHB8qgg3Wi2UFCsN4wnYobvO34uLS2tItyVy8aGbuul3VPryFjfeTuFMn12c5J7sWicqe28QS1cR+0O2SxUMi4Q== 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=SXkn6rfiWWr5ESJ1K0yJAhpOlINgZ93RrpKL+3Ii9a0=; b=4zahZ0rD15k2BbjCL7IrTji4vxeh2zhdvM2CGdfUJypS0uZOsg0Xvyf+3KEXJ/LW0Q4+qSAQuDcC3emSHttkKUBEuUeqER1iiugDCR86Q8PJCxegyeweEwbNRej2xGWvgf5pOkjW2lyO4TV6Qen1oNIbT8qd1g6UBZHNTV4DtFk= Received: from DU2P250CA0016.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:231::21) by DB9PR08MB6989.eurprd08.prod.outlook.com (2603:10a6:10:2c3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Thu, 25 Aug 2022 10:20:33 +0000 Received: from DBAEUR03FT065.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:231:cafe::b5) by DU2P250CA0016.outlook.office365.com (2603:10a6:10:231::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15 via Frontend Transport; Thu, 25 Aug 2022 10:20: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 DBAEUR03FT065.mail.protection.outlook.com (100.127.142.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5566.15 via Frontend Transport; Thu, 25 Aug 2022 10:20:33 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.9; Thu, 25 Aug 2022 10:20:32 +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.2507.9 via Frontend Transport; Thu, 25 Aug 2022 10:20:31 +0000 From: Joey Gouly To: CC: , , , , , , Subject: [PATCH v1 1/3] arm64: module: move find_section to header Date: Thu, 25 Aug 2022 11:20:23 +0100 Message-ID: <20220825102025.53916-2-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220825102025.53916-1-joey.gouly@arm.com> References: <20220825102025.53916-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 6a6fcbc5-d480-420d-1865-08da86837771 X-MS-TrafficTypeDiagnostic: DB9PR08MB6989:EE_|VE1EUR03FT060:EE_|AM5PR0801MB1666:EE_ 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: m1NCcYVGH5DtLeTsJjjomtlLKu6zfeu686zBV5ZP7CtVsreW/Ycx2k0maWtmq4OOFUtgG0fee4riSEGAkr/02EV4/xzhkucPFm8KFcdy4rdjI42GCcmPT1GL2m/rz05pNBJPK4NTFq5SH9ZGCme41Oaukm+uBcH6EPVtI7pS3pwnwlGK4FX43R/q1h1bvmeRa/0tfslQWRVm5tvXq2V/3WetV+2G/tOjGeSEWiBHItTWuYf8Q8Tt6XrUtdd22FSvNZS0J3Fc9/GMZoQqp+Fl61LLp/BISh4KDa7fjPqd0M3JP5VfAFWh1Yz9/64J8yZlYDVtsatD1uWGZ3W01ov5cnCZzNDU7iSst+yqAtrL9TMHhcwhm/wa7c1GI0+jjd7VifEKOp8LdkACP5MiFfYrRljopHgIEXcLV7ozgjJWz8Ravuiw0fJ58zQNvmhkgmglpt0zDPikiWTGQn1CitHkQVAcHY5ELo1Mu6luSnkJxLRoipckOkxRLbArXRrlhQQEfWS3XqkV4lbOMaw9yLnq6oqY5scmW7bU9jZ4GfpE8lM6+AhkWx54S50g4K78CXJhvBFQ1UhG+8P+1Un53ZkUzY//UsblbRJLhvbZryBIYoLUy1A2iXiFyez8JlEqd/RWNSPZooGtzrK85bmfYCEJOmQSRGIzXPqJx7xM2Pkd3D9CLnXrNqYlCyu4Xn/bXeiFmi1eAU3KjwMaBUlJMoqw8vC4Vh2mqnc2xx5E9LESL58dZrXt5M32na3PiZN3hOrHzRx99UvMe7q1fPJkiRMMdurhF16Wvm97syecjzGD7oxt7B14rDFnd2oFH88qGjdH 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:(13230016)(4636009)(346002)(376002)(39860400002)(396003)(136003)(40470700004)(46966006)(36840700001)(83380400001)(82310400005)(86362001)(478600001)(41300700001)(7696005)(2616005)(40460700003)(82740400003)(356005)(81166007)(6666004)(40480700001)(336012)(1076003)(47076005)(426003)(8676002)(70586007)(26005)(36860700001)(36756003)(4326008)(54906003)(316002)(6916009)(44832011)(70206006)(5660300002)(2906002)(186003)(8936002)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6989 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT060.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 5519b2b2-6c62-48d1-f5e4-08da8683718e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5wu5TK+wqljafUDwO8nxoX7I/hF5hlLX+McC+T41v0XJXEWu3Ph07Enlb0gapUiJKv9zwwOqYnlhWo8f8AX8YRKRVKZFEJ76Bqkf6EXALfVq9ME9ePJxPb2cKgkwMJNqfo5Rju/xByU6Y8rg2is2pnjurieLIJebKCh31KcGxZspUb7QolxSP8CjKBqTLRnQMkFu+bL63hZe4HuOgcTQwa+PtJvAzuHZY5gRw4bSsFEJicyfbuPNwjYaZdPpMLnjSXyv9uSraOJo1M68CY5dG/Vcc9gSIn9+uzY6IJgRPKA6NPgqhmapOp/cDYadt8Ne9B1dWO8A7eo3Hgmfl6fC6kVhJheQUDPD4pAZYlEl6/2U9hhUOdIVi46bFbZC54jH6pPQ5n5vJWneaci4yVMiQbcOmmErHZQHiK6++1nlSvCpGr2oBDQbzhpVsgHUvNiPxpyanZUxzfN3cM20fyN2aVykEMcm3Ur8I/FeyNNGInFk+BfA1SScr6d27DboGn3n7F2SZG2EqHTMS5QK0dx+stpWpRfwoiGtJTg94gmoQZY3G1ZwkiUsXOi5zTVeJ/EmBzZtQAXi2Y7ROSMs4rwtL0cfvACyZ9q+aPRx5AHGwslD5IFUV/dCWDUqS2jF37Meo5/dFTh7MqQ7azaNDPfJ1Z9QkKrtVn4dPuQYdvKDh5Z77RyKWWM1uznfEypwrE2zvt4PqDJwfuHCKC2tYwV4spO8256pASro0Ut8w6dCL6KT0mJ0ZwupCW7o9LGNItkRLGjoGeNfbeELD+cU/k01Eg== 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:(13230016)(4636009)(396003)(346002)(376002)(136003)(39860400002)(46966006)(36840700001)(40470700004)(40480700001)(81166007)(86362001)(70586007)(70206006)(54906003)(6916009)(316002)(36860700001)(82310400005)(4326008)(8676002)(426003)(2616005)(336012)(1076003)(83380400001)(186003)(47076005)(82740400003)(40460700003)(26005)(7696005)(2906002)(41300700001)(5660300002)(6666004)(8936002)(107886003)(36756003)(478600001)(44832011);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2022 10:20:42.7834 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6a6fcbc5-d480-420d-1865-08da86837771 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: VE1EUR03FT060.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1666 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220825_032050_539476_F7D6F3BB X-CRM114-Status: GOOD ( 11.94 ) 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 Move it to the header so that the implementation can be shared by the alternatives code. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Acked-by: Mark Rutland --- arch/arm64/include/asm/module.h | 15 +++++++++++++++ arch/arm64/kernel/module.c | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/arm64/include/asm/module.h b/arch/arm64/include/asm/module.h index 4e7fa2623896..22f1be47cc92 100644 --- a/arch/arm64/include/asm/module.h +++ b/arch/arm64/include/asm/module.h @@ -65,4 +65,19 @@ static inline bool plt_entry_is_initialized(const struct plt_entry *e) return e->adrp || e->add || e->br; } +static inline const Elf_Shdr *find_section(const Elf_Ehdr *hdr, + const Elf_Shdr *sechdrs, + const char *name) +{ + const Elf_Shdr *s, *se; + const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; + + for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) { + if (strcmp(name, secstrs + s->sh_name) == 0) + return s; + } + + return NULL; +} + #endif /* __ASM_MODULE_H */ diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c index f2d4bb14bfab..76b41e4ca9fa 100644 --- a/arch/arm64/kernel/module.c +++ b/arch/arm64/kernel/module.c @@ -476,21 +476,6 @@ int apply_relocate_add(Elf64_Shdr *sechdrs, return -ENOEXEC; } -static const Elf_Shdr *find_section(const Elf_Ehdr *hdr, - const Elf_Shdr *sechdrs, - const char *name) -{ - const Elf_Shdr *s, *se; - const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; - - for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) { - if (strcmp(name, secstrs + s->sh_name) == 0) - return s; - } - - return NULL; -} - static inline void __init_plt(struct plt_entry *plt, unsigned long addr) { *plt = get_plt_entry(addr, plt);