From patchwork Wed Nov 29 23:44:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 10083911 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2D7B56020B for ; Wed, 29 Nov 2017 23:45:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F40A29C3E for ; Wed, 29 Nov 2017 23:45:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1388929C5E; Wed, 29 Nov 2017 23:45:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA99B29B65 for ; Wed, 29 Nov 2017 23:45:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753350AbdK2XpU (ORCPT ); Wed, 29 Nov 2017 18:45:20 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:34030 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753052AbdK2XpD (ORCPT ); Wed, 29 Nov 2017 18:45:03 -0500 Received: by mail-pl0-f65.google.com with SMTP id d21so3069787pll.1 for ; Wed, 29 Nov 2017 15:45:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Moej54w+jJd3UH1FNfYz1TSe1vIGd304xnvK4zulol0=; b=Tm2HAkS9h+GKzB4BYtmI9iqwwiZhlraFU4sn2WPj38ZjM5TQT8JRGTlmbgxwRjdM56 nKR5GFTWmFWeGp289JjqyfBvzKkxvqHP3u3qO9U1qR4PEb+goTje/QPkZToiiLeRbyjS hixPhnb6mrbXguHYx4ghRI33+0GnqJiX6+YYaEupxulXu34VW4gphOt0dmO515JFM/FM vizTH5K4jzx+h3w8nqANSPMqU3FrnYzpu66x9aTU34OPjOLpSQvLU4AEnQdRLqx9h0+V Z50D0zfMh7WiCk0dQJHqGzmE3wflrarNX2yyUAvd8chl600qIuxPY4LbvOoqCmDvXVTg sT3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Moej54w+jJd3UH1FNfYz1TSe1vIGd304xnvK4zulol0=; b=K3a4HeeJNPBxGGwBEtRyAbJrr5irrUPBOQC1gqOlAckHxPrm+uyML63eoNLMD408Mg G7xxzGDELNrJdT7/VTxA4eP/jSFwyhGAW23v2V13EOfXfsyrdcX3cSqvMhlYJHh4Nr5W fjrZ8WSMRKgHg+emUDhrpkeb/5WfSAQJczr+k0YWAX7SwLmHb32R9YC1XRURwDHstbCv rTJOgfHqvFjS//ispOkxXzoyeRGZN77h6qtE+EKBFRki5qGd/M+ZtlJ2NmlxqyHtq9HS D4pcd5bBY5MvfU15ncLsX62lCIeyVi/tiUNz78PoVOMB0PPJkh4lddzyqdRGTO/B/vuA dN/w== X-Gm-Message-State: AJaThX6kAU/d/+jwg0A9hQSGuyNHRMRzmywYa1GRrVa0yo3CYUhpcUnY iC79Qt+vbSBrfrvlCSCe6G4KTg== X-Google-Smtp-Source: AGs4zMbTM9QiaK7NZcSw7EkOqgFUcma6K7zNiLNY8uIJ9Vi7Ex/MC+od81S5fznLsd7OiDssG51t3g== X-Received: by 10.84.168.198 with SMTP id f64mr584899plb.324.1511999102444; Wed, 29 Nov 2017 15:45:02 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id s14sm5326948pfe.36.2017.11.29.15.45.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Nov 2017 15:45:01 -0800 (PST) From: Sami Tolvanen To: Alex Matveev , Andi Kleen , Ard Biesheuvel , Greg Hackmann , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Masahiro Yamada , Maxim Kuvyrkov , Michal Marek , Nick Desaulniers , Yury Norov , Matthias Kaehlcke , Nicholas Piggin Cc: Sami Tolvanen Subject: [PATCH 7/7] arm64: add a workaround for GNU gold with ARM64_MODULE_PLTS Date: Wed, 29 Nov 2017 15:44:42 -0800 Message-Id: <20171129234442.655-8-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.531.g2ccb3012c9-goog In-Reply-To: <20171129234442.655-1-samitolvanen@google.com> References: <20171129234442.655-1-samitolvanen@google.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All current versions of GNU gold crash when linking kernel modules with ARM64_MODULE_PLTS due to a known bug: https://sourceware.org/bugzilla/show_bug.cgi?id=14592 To work around the problem, this change removes NOLOAD from .plt and .init.plt. Signed-off-by: Sami Tolvanen Acked-by: Ard Biesheuvel --- arch/arm64/kernel/module.lds | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/module.lds b/arch/arm64/kernel/module.lds index f7c9781a9d48..eacb5c67f61e 100644 --- a/arch/arm64/kernel/module.lds +++ b/arch/arm64/kernel/module.lds @@ -1,4 +1,4 @@ SECTIONS { - .plt (NOLOAD) : { BYTE(0) } - .init.plt (NOLOAD) : { BYTE(0) } + .plt : { BYTE(0) } + .init.plt : { BYTE(0) } }