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: 10060347 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 7EF9660231 for ; Wed, 15 Nov 2017 21:37:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CB502A31C for ; Wed, 15 Nov 2017 21:37:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 611B62A31E; Wed, 15 Nov 2017 21:37:40 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EE6402A31C for ; Wed, 15 Nov 2017 21:37:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Tm/pp5a6ags6FEYOyilki9AOJcOasplhjI8InmwoamY=; b=W7ks8J1ZMmoXLuGkkRZAAwHKV4 kvugB6IJHFGijLIG3pDANlq4D8gXEmfSpBOtEg5hzWV3fHogxSvrBhBoo/BRKyq4PNjxJ3dLFmP0D 6T07GA3TFfPsFmbCor+sQxmHeZRr3FM1aw8KvBUK6+gdy+RylrpERMH5QXzEOljsFVb6WS+IgpMRv 47TEkgLzd+0QARa4dQToWXjQ0nl+LQqCA5CKVZaxWuYOovdGH9ov/poB3DjO0tSZCTK9+HIMxQmbb dmOdOW9oyHQdV2GKSDOfXLxkwoi6Czs1AFChQ0272fF2Q2bqjL1LbVy/c7w2QgKU7byuGNi1q94za hgcC3nHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eF5NK-0002tJ-TF; Wed, 15 Nov 2017 21:37:38 +0000 Received: from mail-io0-x241.google.com ([2607:f8b0:4001:c06::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eF5L4-00089k-JK for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2017 21:35:22 +0000 Received: by mail-io0-x241.google.com with SMTP id g73so3074203ioj.8 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=haDe7s2SFPySQzvYiQYYvzu6mv+GGRHhXaVSRzL7DRaTEswwZfhNBCJTVp+mYcUGe9 l0s0YBb04VRBkqt3GkbZoMftd0EaW3jzXysH2Z2CVPbg73c6wRNVPJXeJr3DlXzaMgif LwSizUa5VnyCl9bNoRVbZxB2N4g33B0qcU2WN/6sqNb/ayvzLvwjtsGm/cPwU6Bi7g5d u3+4bTbMTUES94bKBOyfpjUUk/5KMhj/zcr6G3l1PaO0DEeZT2U8/868S7lzP8V//oI4 2s5Py9UAaDMKJKSumPP7qCpSRaSKlBjuW16CmSGYG4Alv6HWWbInCemJ5Cw5emZBB5ru MqJQ== X-Gm-Message-State: AJaThX4Qi0JpfSTDBybjq9okW2GTrw03MekqbxHT/Cxwl4Yni8UWQ0iE WkEk5AeyQNzaQV36YNPG16/8vw== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171115_133519_167934_0AD64131 X-CRM114-Status: GOOD ( 10.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sami Tolvanen MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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) } }