Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3927155imm; Mon, 8 Oct 2018 11:49:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV61rMb7CzGyxdtM9ZCvmx4saw/YGBbZDbGfbQ8R7OAgeQ1MgD3D4nC/MSJVrDCDvs075Vwlb X-Received: by 2002:a62:2bc2:: with SMTP id r185-v6mr26456109pfr.21.1539024558739; Mon, 08 Oct 2018 11:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024558; cv=none; d=google.com; s=arc-20160816; b=rycQHP2K5SbkOMFEo9F8bthaQqZhit03eXgzcPswS5Rk3brsCLj2au/v6qtDnlOFZI 3w8p+7WWgAG2qhtzDlfT6maUroJmdXqkFc5JCR5QYldaOSpslIOH4tPy+QgAln47hzBP SkIPi6tSoZZSCjjqVqjOl2RPWPcgUYht6QP3Lsr45VV4sH4Pnd8+AJ02tgOy4WYlU3S+ ZaGmSu1R7Ounw/SOu5RO6fBPPkgD28qTIkof0U+Wfik7eRuAczGize8WD7opqH0XrfwK iVXjU+ihCl6vKSKf0V28CZHyBv9JCGhLGdCZzYRl+wfu1hmAbyHpRmDm/Omt+OzIh08l TL/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yec3u9kfg13LxpSasdcHAU5U6bZPS9DezzfaY5jXkJc=; b=AbsLZp0qbiKr1yXVyi7SfGtehkVbTF7aa8WZDQ2HneDBjsJ+2oR2uz50mdXoKtMxIs 80kuzyumqLavgOxG+HP9npEhagf/C4zKNfWaCnbf2JuZ6eldiY/VOgBH9qIwNrWpmUlq 75ZUYx6DatAFSXQIhxD9+fO4DyYNesGVI0gxqBtJwDkauF1j8hR6NsATai9A2EGKaHZO SEbA2ZJ1YGgISTtGajXpr+C6FFGPoSCX4vZwV2/jqAA5PsoKERigK2HDx/xRMzjR5XYu orUS+rBxF+AEk8oFS4BrGGBLqnZ+arvIdmN3xuDlGYz0LvU0QcaHNDpA6bWYhJ2GOxQ4 H3/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WExYn2Gv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g24-v6si5079637pgh.188.2018.10.08.11.49.03; Mon, 08 Oct 2018 11:49:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WExYn2Gv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731775AbeJICCD (ORCPT + 99 others); Mon, 8 Oct 2018 22:02:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:51268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726991AbeJICCD (ORCPT ); Mon, 8 Oct 2018 22:02:03 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 88688214C4; Mon, 8 Oct 2018 18:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024536; bh=mWjvlSQLvqOGjIot+fijj9vgQ8nmhDWLO9sGIWetaJU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WExYn2Gv1JtbDL0Tpvmy+mShBgnJmX49Xi3RougYfnrCgl1/+iXbYqic4Flr8xAcg p9CNRaOcTZQOE7ley8YaKt3rX6HYFy9pWwbTZf/xoBNy0ITvjLTBXyapbblD+GGYZY U9tgq79X5lL0+qb4oXxIAuYL73r9zujIC3vXdsnQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Greentime Hu , Masami Hiramatsu , Sasha Levin Subject: [PATCH 4.18 073/168] nds32: linker script: GCOV kernel may refers data in __exit Date: Mon, 8 Oct 2018 20:30:53 +0200 Message-Id: <20181008175622.847413184@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Greentime Hu [ Upstream commit 3350139c0ff3c95724b784f7109987d533cb3ecd ] This patch is used to fix nds32 allmodconfig/allyesconfig build error because GCOV kernel embeds counters in the kernel for each line and a part of that embed in __exit text. So we need to keep the EXIT_TEXT and EXIT_DATA if CONFIG_GCOV_KERNEL=y. Link: https://lkml.org/lkml/2018/9/1/125 Signed-off-by: Greentime Hu Reviewed-by: Masami Hiramatsu Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/nds32/kernel/vmlinux.lds.S | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/arch/nds32/kernel/vmlinux.lds.S +++ b/arch/nds32/kernel/vmlinux.lds.S @@ -13,14 +13,26 @@ OUTPUT_ARCH(nds32) ENTRY(_stext_lma) jiffies = jiffies_64; +#if defined(CONFIG_GCOV_KERNEL) +#define NDS32_EXIT_KEEP(x) x +#else +#define NDS32_EXIT_KEEP(x) +#endif + SECTIONS { _stext_lma = TEXTADDR - LOAD_OFFSET; . = TEXTADDR; __init_begin = .; HEAD_TEXT_SECTION + .exit.text : { + NDS32_EXIT_KEEP(EXIT_TEXT) + } INIT_TEXT_SECTION(PAGE_SIZE) INIT_DATA_SECTION(16) + .exit.data : { + NDS32_EXIT_KEEP(EXIT_DATA) + } PERCPU_SECTION(L1_CACHE_BYTES) __init_end = .;