Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2457076imd; Fri, 2 Nov 2018 11:43:53 -0700 (PDT) X-Google-Smtp-Source: AJdET5fcESf4Jjr3YZgj/HGl4TAqvdl3kYSTLvrXs0C77m147gsfR+7GJpE6CkNr7/+EOdAyse+i X-Received: by 2002:a63:c746:: with SMTP id v6-v6mr12096151pgg.108.1541184233212; Fri, 02 Nov 2018 11:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184233; cv=none; d=google.com; s=arc-20160816; b=ZC0zuINKkFZcixprD2eFWi+WMxFhvlWU+KBSxGejIwJCWvjSHXaTA/OkN8HvcLSQBT jdb8LKvDyBMywIfpjafduAoFf1JS70wTnDrWU9VBB13ihCtsI3ZoqMioPPxB3eGiMsw/ wx+DjoGBluEJ9VDWQka47ydtRNuN2FN79i/mN62YNObLII/1vR8nOrBswrvlGCQ1OChk 4ijoedOdVYdHlmD4kzuV78qXRYpc1nbi0EQISXzYTC26ZGxP1S+6O1OplLOooPoMyHri OXKw3OIGDIVEe99ym4WU9zGckKkrAgYeFBVqPFaGyqL+wF3LTP3X0yarQznb1hEa9ibM 1QeA== 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=2R6htEcCNKCDNkvKwYsDD8f3fb9ebta74bL2k50qxf0=; b=JEFgQW5jSRWcXM26/q0jmdr0ZkDhveBhRkU6PJg/1iyCq+AHMbW2paWFBlIK/n1neq o7I2znDqIlxIj8w4Guzpy5iZVzSCjbt9N7mo82fXi1WEAQGHZ2lQnMjP/Bw2rDV+JLEC mN9afNL2IYvDB53zJgJkEZQN1h/wU61Rg1wSeJioVb9LhHeqAXnI0f/CKl/YugIRG4lV 6rMdOec2Gu+OMYuqXruAukjzAmihOpMRoGAznMCXdxpQft9I6U/b0xE7UIGELT6/CWi+ vmqgs7/Zr1+9cOAcUVvl5AN3NLmjunrhamAIdYxyUTTRIBEIMKfNShV40oAKiw0vhFuR NQLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MjuFagtu; 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 i1-v6si33593244pgm.328.2018.11.02.11.43.39; Fri, 02 Nov 2018 11:43:53 -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=MjuFagtu; 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 S1729819AbeKCDur (ORCPT + 99 others); Fri, 2 Nov 2018 23:50:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:45898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728033AbeKCDuq (ORCPT ); Fri, 2 Nov 2018 23:50:46 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 CA1B62084A; Fri, 2 Nov 2018 18:42:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541184154; bh=y3wHrv4IMw0y6Oq0BPXJpNz3471o2swGlCqqM7ha41k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MjuFagtuxUTz6IH/XPpnv0K98FZkNm2Fe4AP/BozrBNoZ7rWFc89AI9lBvRUNNsQ/ JkKDNnCNRHXGu9OI6biFOrz0MIHLn4cCaodI261t8IB41X42HaUqUFbfu3TyeNOLyD dVMHFQRYo4m8DoC5BqzXpUBVYJQtVd0O9CCnfzAw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Greentime Hu , Masami Hiramatsu , Peter Oberparleiter , Stephen Rothwell , Sasha Levin Subject: [PATCH 4.18 096/150] vmlinux.lds.h: Fix incomplete .text.exit discards Date: Fri, 2 Nov 2018 19:34:18 +0100 Message-Id: <20181102182910.115039624@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@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. ------------------ [ Upstream commit 8dcf86caa1e3daf4a6ccf38e97f4f752b411f829 ] Enabling CONFIG_GCOV_PROFILE_ALL=y causes linker errors on ARM: `.text.exit' referenced in section `.ARM.exidx.text.exit': defined in discarded section `.text.exit' `.text.exit' referenced in section `.fini_array.00100': defined in discarded section `.text.exit' And related errors on NDS32: `.text.exit' referenced in section `.dtors.65435': defined in discarded section `.text.exit' The gcov compiler flags cause certain compiler versions to generate additional destructor-related sections that are not yet handled by the linker script, resulting in references between discarded and non-discarded sections. Since destructors are not used in the Linux kernel, fix this by discarding these additional sections. Reported-by: Arnd Bergmann Tested-by: Arnd Bergmann Acked-by: Arnd Bergmann Reported-by: Greentime Hu Tested-by: Masami Hiramatsu Signed-off-by: Peter Oberparleiter Signed-off-by: Stephen Rothwell Signed-off-by: Sasha Levin --- arch/arm/kernel/vmlinux.lds.h | 2 ++ include/asm-generic/vmlinux.lds.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h index ae5fdff18406..8247bc15addc 100644 --- a/arch/arm/kernel/vmlinux.lds.h +++ b/arch/arm/kernel/vmlinux.lds.h @@ -49,6 +49,8 @@ #define ARM_DISCARD \ *(.ARM.exidx.exit.text) \ *(.ARM.extab.exit.text) \ + *(.ARM.exidx.text.exit) \ + *(.ARM.extab.text.exit) \ ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text)) \ ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text)) \ ARM_EXIT_DISCARD(EXIT_TEXT) \ diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index e373e2e10f6a..a11f86014352 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -617,8 +617,8 @@ #define EXIT_DATA \ *(.exit.data .exit.data.*) \ - *(.fini_array) \ - *(.dtors) \ + *(.fini_array .fini_array.*) \ + *(.dtors .dtors.*) \ MEM_DISCARD(exit.data*) \ MEM_DISCARD(exit.rodata*) -- 2.17.1