From patchwork Wed Nov 15 21:34:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 10060351 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 48A6060231 for ; Wed, 15 Nov 2017 21:38:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36FC62A31D for ; Wed, 15 Nov 2017 21:38:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AFF52A31F; Wed, 15 Nov 2017 21:38:09 +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 A99852A31D for ; Wed, 15 Nov 2017 21:38:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932798AbdKOVgK (ORCPT ); Wed, 15 Nov 2017 16:36:10 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:42771 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759191AbdKOVfA (ORCPT ); Wed, 15 Nov 2017 16:35:00 -0500 Received: by mail-io0-f193.google.com with SMTP id u42so3084776ioi.9 for ; Wed, 15 Nov 2017 13:35:00 -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=GgRREF5dgPN61hIeGefF2cI4zT0/bXRZsTX33U2+tLM=; b=c+unTcrHhMXZXBqd4wb44LGjXy9v5VhYCSTd9vCgTBNRiDmqclyv2we4zOo69JIJhb nJx+bgfZ2B7ALGkRNQI3fr6h2Efepq+5Mqg673BL1rjtKw/7HVpTUyjR8bGkVQKWpSh1 VEOsHtRlzDhZW4KpoZe8LQUMyLSQjFTprbUJL5BzRczZBj/XvIEDh1IvKL6L0duGbcYK WZ1HfoemcIoaZJv8WkB+YKlUHSS22Pqly1R6priEDQDxLyb7sSGEQl8ulag4AzKoV+6E FbNiU+HU6cC/o4UQ/mYPoOu4N+b7C6DPqgyakrrIhpeEM8RDAKPPqgwGd23pOO+4M97o fAWA== 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=GgRREF5dgPN61hIeGefF2cI4zT0/bXRZsTX33U2+tLM=; b=ailvNnHs92H9XM6l5tflC/4DGYzJfxzwg8rJXQ3uaJtBkKS9R53oOSRwU9gnRkdDXZ KyaO4M+aqbcpfDTHtbHW6wBXqg9wo8jnyTN+lxx/B9Nd+ptNZN9KsWNIThwr62RoMlHu b22VR6y3m4xYf983gbOnt5wpYB0wDcHau5YzSkQCZqHHxGUlcYhQO2LHc/cwJQ0PULmi rl2m3Tesj5RdxEdVhMXKCjf+276GafrTfP1y/BL50C2k/kDrl0mTbcEbuBHyvF6R9RVr XMgoZoTe9yvCv4g7pY6LPGbhejJYKfxup5XHNSLQ6t2wUFKPRMJctM3j+Ny5GIf2fiS3 i2/Q== X-Gm-Message-State: AJaThX6EwsOqtYeTp7muKriilCA1IsmwJXaiMdMAlMi18+y+brO/e1KG 8WV1M8iqVfTA2ZPj7EvRB386Qw== X-Google-Smtp-Source: AGs4zMbXDlItvXwYkFYHI4yso1RnCIgoJwW8/8d2T/l9RJ0Js48kb0NcUU6VZYy6up3tGUo9J3Aofw== X-Received: by 10.107.11.91 with SMTP id v88mr20629513ioi.179.1510781699212; Wed, 15 Nov 2017 13:34:59 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id 68sm9735197iov.2.2017.11.15.13.34.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Nov 2017 13:34:58 -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 Cc: Sami Tolvanen Subject: [PATCH v2 10/18] arm64: add a workaround for GNU gold with ARM64_MODULE_PLTS Date: Wed, 15 Nov 2017 13:34:20 -0800 Message-Id: <20171115213428.22559-11-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.448.gf294e3d99a-goog In-Reply-To: <20171115213428.22559-1-samitolvanen@google.com> References: <20171115213428.22559-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 CONFIG_CLANG_LTO depends on GNU gold and due to a known bug, the linker crashes when ARM64_MODULE_PLTS is enabled: https://sourceware.org/bugzilla/show_bug.cgi?id=14592 To work around the problem, this change removes NOLOAD from .plt and .init.plt, which allows us to link modules with ld.gold. Signed-off-by: Sami Tolvanen --- 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) } }