From patchwork Thu Feb 25 09:54:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 387632 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72AFEC433E6 for ; Thu, 25 Feb 2021 10:06:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 252D664EC8 for ; Thu, 25 Feb 2021 10:06:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233860AbhBYKGB (ORCPT ); Thu, 25 Feb 2021 05:06:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:34226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234962AbhBYKBT (ORCPT ); Thu, 25 Feb 2021 05:01:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6286E64F2E; Thu, 25 Feb 2021 09:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614246964; bh=BjnqRSgTghxHTC/Y2mXgCFEH6teFqCdVhUhL3nlqKnA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ixG2HLcUC+frIgG1Ac7Xc4MIip46mwlDbCorpZXUk3BJRDfA/AhgihZ6+7Z0/FV66 XdAGcnyZZ0lTxcI9XcbroNeqJdp95Jtoyqieh3ua8MxKGV9StDgppZWo7edJsg8j/K fYNvvdnmTATfuxKhOC4svol8qRUwuJTpgStiWVWA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rong Chen , kernel test robot , Yoshinori Sato , Rich Felker , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 5.4 17/17] scripts/recordmcount.pl: support big endian for ARCH sh Date: Thu, 25 Feb 2021 10:54:02 +0100 Message-Id: <20210225092515.838349974@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210225092515.001992375@linuxfoundation.org> References: <20210225092515.001992375@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rong Chen [ Upstream commit 93ca696376dd3d44b9e5eae835ffbc84772023ec ] The kernel test robot reported the following issue: CC [M] drivers/soc/litex/litex_soc_ctrl.o sh4-linux-objcopy: Unable to change endianness of input file(s) sh4-linux-ld: cannot find drivers/soc/litex/.tmp_gl_litex_soc_ctrl.o: No such file or directory sh4-linux-objcopy: 'drivers/soc/litex/.tmp_mx_litex_soc_ctrl.o': No such file The problem is that the format of input file is elf32-shbig-linux, but sh4-linux-objcopy wants to output a file which format is elf32-sh-linux: $ sh4-linux-objdump -d drivers/soc/litex/litex_soc_ctrl.o | grep format drivers/soc/litex/litex_soc_ctrl.o: file format elf32-shbig-linux Link: https://lkml.kernel.org/r/20210210150435.2171567-1-rong.a.chen@intel.com Link: https://lore.kernel.org/linux-mm/202101261118.GbbYSlHu-lkp@intel.com Signed-off-by: Rong Chen Reported-by: kernel test robot Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- scripts/recordmcount.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index 3f77a5d695c13..0bafed857e171 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl @@ -268,7 +268,11 @@ if ($arch eq "x86_64") { # force flags for this arch $ld .= " -m shlelf_linux"; - $objcopy .= " -O elf32-sh-linux"; + if ($endian eq "big") { + $objcopy .= " -O elf32-shbig-linux"; + } else { + $objcopy .= " -O elf32-sh-linux"; + } } elsif ($arch eq "powerpc") { my $ldemulation;