Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2273347pxb; Mon, 11 Jan 2021 05:45:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzWKPNRgK2gXuW23bKwgxLnGRh3WqvuGx+T53SFo9pteuvsnsP+G7n3rs24riuK4YJ3L/ml X-Received: by 2002:a17:906:e94c:: with SMTP id jw12mr11164611ejb.56.1610372749659; Mon, 11 Jan 2021 05:45:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610372749; cv=none; d=google.com; s=arc-20160816; b=ow9+O8XzNknKXEUPUlyS2B8hu4h4j+MFIPMoSkvkAdeoplQiJv2KtQefofCXyekoTA IbMZIiRvQotF8bcWXZM5ykQJxt1p2MZm2bMy+3G2PDKj47OJCNM7spDtqrhVVJ+XnTGt cy5xhsqQUZ7sJ43/K/rRHstUGTOdycT40i9ODtnYf3o2KaEMZcRk7Xvt02Y7Fa6YWbo5 ou01/POxQ+2D8yuwvmRfACTnQSSPdnydUvAJRzcNNnTl1YC+nIDMKeOVr0O9znMm1IXM FDiQWqiPc2HoSgeC1d2fgPIWXSZz2aqchtoux3d+0XJIN9+ymeTs3RPTcZn3Z/7F0vy6 t88g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p+Z+Q1oUY5QTRlT7uKYlPiuLlms8ALZHxUXPnBgkjNQ=; b=y7CgUYT6ShWA60gZ64FChZXUEK3GIXvmONYgDAPzb/g4Cs3pQivEZ8ptBNlhgKWXre DZiKQWKXkG4Q4jMLv9cx6Q76eeBzJYEr9g4bue5xadbeAW+YtKk3kFztTfAtF45lBlTD rMwF1ookkM3tg3EdbUDAaGID1mLlZO9ZZS+RBld6vSnXjLJGoaMHAwa3g2zXtqus/BAw l4aNt5yHIpfDxxt3QmtQAkO7JluN/T1HkmwP1TXSJTcXJrEYzuEpmJZQCS0cfIz7oTkS s4xBCp7ju2r+JjuXTyRdDhrm0mTs6/EKaSiOC/jqNHT8bPCqu6R7/rD0Q63a7aAhFnjc Vrrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rNc+y9jX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si6444811ejr.464.2021.01.11.05.45.25; Mon, 11 Jan 2021 05:45:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rNc+y9jX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730983AbhAKNMV (ORCPT + 99 others); Mon, 11 Jan 2021 08:12:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:58500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731422AbhAKNLg (ORCPT ); Mon, 11 Jan 2021 08:11:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C9C4822BE9; Mon, 11 Jan 2021 13:11:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610370681; bh=hXGonQ0Il0FvCFkAfgbzTwdEh4Q1yVy1OFZ7lCrPz9I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rNc+y9jX/fHwjfkRYxG//I/QMyW20FtK1jwYkV1E9AeYSvknQKyomsfC+SpR0tBTF zseCZ0I21hozSF9lpI2leCDZhDg45A8Y3x9+cqmHll8D/tQG8eBzUomVqjSp+vOpXE 1EiRQphBH9qvrQQxOW97zQRp8dSlkUs1s44aVLIg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Michael Ellerman Subject: [PATCH 5.4 51/92] powerpc: Handle .text.{hot,unlikely}.* in linker script Date: Mon, 11 Jan 2021 14:01:55 +0100 Message-Id: <20210111130041.599697102@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210111130039.165470698@linuxfoundation.org> References: <20210111130039.165470698@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor commit 3ce47d95b7346dcafd9bed3556a8d072cb2b8571 upstream. Commit eff8728fe698 ("vmlinux.lds.h: Add PGO and AutoFDO input sections") added ".text.unlikely.*" and ".text.hot.*" due to an LLVM change [1]. After another LLVM change [2], these sections are seen in some PowerPC builds, where there is a orphan section warning then build failure: $ make -skj"$(nproc)" \ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- LLVM=1 O=out \ distclean powernv_defconfig zImage.epapr ld.lld: warning: kernel/built-in.a(panic.o):(.text.unlikely.) is being placed in '.text.unlikely.' ... ld.lld: warning: address (0xc000000000009314) of section .text is not a multiple of alignment (256) ... ERROR: start_text address is c000000000009400, should be c000000000008000 ERROR: try to enable LD_HEAD_STUB_CATCH config option ERROR: see comments in arch/powerpc/tools/head_check.sh ... Explicitly handle these sections like in the main linker script so there is no more build failure. [1]: https://reviews.llvm.org/D79600 [2]: https://reviews.llvm.org/D92493 Fixes: 83a092cf95f2 ("powerpc: Link warning for orphan sections") Cc: stable@vger.kernel.org Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1218 Link: https://lore.kernel.org/r/20210104205952.1399409-1-natechancellor@gmail.com Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -98,7 +98,7 @@ SECTIONS ALIGN_FUNCTION(); #endif /* careful! __ftr_alt_* sections need to be close to .text */ - *(.text.hot TEXT_MAIN .text.fixup .text.unlikely .fixup __ftr_alt_* .ref.text); + *(.text.hot .text.hot.* TEXT_MAIN .text.fixup .text.unlikely .text.unlikely.* .fixup __ftr_alt_* .ref.text); #ifdef CONFIG_PPC64 *(.tramp.ftrace.text); #endif