Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1714082pxb; Tue, 26 Oct 2021 14:29:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhf89Hu6ZK8/4AfrBWJVF0+KuohFSemT7pMcW0wMJczJ2VIBv9OBZRDsptU14ONTtHiT5F X-Received: by 2002:a17:902:728b:b0:13f:c086:bdfe with SMTP id d11-20020a170902728b00b0013fc086bdfemr24730329pll.6.1635283762688; Tue, 26 Oct 2021 14:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635283762; cv=none; d=google.com; s=arc-20160816; b=j81JOpiTEPdertz2STjZdsAUuWx+RDMJcCRuka/RM4XJtUyyMV26woCgK1MZc/Q4Xl kQYBEnhpVYqtSV8F2zpggqWPoEVr+8IfgBOwPRUAHsnUC13dbXrt3ne28QGnI4eOhqYI ky3pEfC6v4vtHeNcR0XlEeKmcGJYjpo8e7+PNus1cSvr42cUE0aw5RthJwyGX7urSc5f Yyx7ZoiUKFEyQNbyCrJOCkE7s2McnBZ7+x0NkWOno0OGBa4nHHB2tnrCD1SA2/abG41a Kv3duxl4Jbr0lzFR2ZuHU9zyQTsY884hZSVcjPPuOvGgSrEDDtfnPQIJNc1pbnLiIQXG TTaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ipvIlVoRrxVhzvzmCAkoB4JIrypcV0MbYtSnBsWcZe0=; b=M+6XkSVdzOGPtHwoZO+/Js33NLQyMA7wpu6oRlK2RWg+AOFYicRFQC7I4mvLoP00gh IDjshS8DIEqbzyxMQDKmuv9DYGYPvBmNYnEF4kiWBEiT6/u78GzyiRXeK4wPanpRx1w+ sN0XfyE7eNVyC1sVjybEkIywwnWCVWvyNfDPcaT3u5/sL0K3+zXerSWVSYxkNQvLe+vS iScFstPpHGd2TyvYMk07zbrZwL4efgTwwylXqwYXhh546D7hgT4SilMe7nfM/ehGiBV+ tQh1OKV8gMl9RYg9OmgaU9vivDfs38BhfnUy1rVC+55Vv9ZrsaZ3G1ErKsz5HQVaAHqV 5jJw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rj7si2881556pjb.12.2021.10.26.14.29.08; Tue, 26 Oct 2021 14:29:22 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237214AbhJZQHe (ORCPT + 99 others); Tue, 26 Oct 2021 12:07:34 -0400 Received: from gate.crashing.org ([63.228.1.57]:33407 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234271AbhJZQHd (ORCPT ); Tue, 26 Oct 2021 12:07:33 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 19QFxfkQ012472; Tue, 26 Oct 2021 10:59:41 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 19QFxeef012468; Tue, 26 Oct 2021 10:59:40 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 26 Oct 2021 10:59:40 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] powerpc/boot: Set LC_ALL=C in wrapper script Message-ID: <20211026155940.GX614@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 26, 2021 at 03:48:29PM +0200, Christophe Leroy wrote: > While trying to build a simple Image for ACADIA platform, I got the > following error: > > WRAP arch/powerpc/boot/simpleImage.acadia > INFO: Uncompressed kernel (size 0x6ae7d0) overlaps the address of the wrapper(0x400000) > INFO: Fixing the link_address of wrapper to (0x700000) > powerpc64-linux-gnu-ld?: mode d'?mulation non reconnu?: -T > ?mulations prises en charge?: elf64ppc elf32ppc elf32ppclinux elf32ppcsim elf64lppc elf32lppc elf32lppclinux elf32lppcsim > make[1]: *** [arch/powerpc/boot/Makefile:424 : arch/powerpc/boot/simpleImage.acadia] Erreur 1 > make: *** [arch/powerpc/Makefile:285 : simpleImage.acadia] Erreur 2 > > Trying again with V=1 shows the following command > > powerpc64-linux-gnu-ld -m -T arch/powerpc/boot/zImage.lds -Ttext 0x700000 --no-dynamic-linker -o arch/powerpc/boot/simpleImage.acadia -Map wrapper.map arch/powerpc/boot/fixed-head.o arch/powerpc/boot/simpleboot.o ./zImage.3278022.o arch/powerpc/boot/wrapper.a > > The argument of '-m' is missing. > > This is due to the wrapper script calling 'objdump -p vmlinux' and > looking for 'file format', whereas the output of objdump is: > > vmlinux: format de fichier elf32-powerpc > > En-t?te de programme: > LOAD off 0x00010000 vaddr 0xc0000000 paddr 0x00000000 align 2**16 > filesz 0x0069e1d4 memsz 0x006c128c flags rwx > NOTE off 0x0064591c vaddr 0xc063591c paddr 0x0063591c align 2**2 > filesz 0x00000054 memsz 0x00000054 flags --- > > Add LC_ALL=C at the beginning of the wrapper script in order to get the > output expected by the script: > > vmlinux: file format elf32-powerpc > > Program Header: > LOAD off 0x00010000 vaddr 0xc0000000 paddr 0x00000000 align 2**16 > filesz 0x0069e1d4 memsz 0x006c128c flags rwx > NOTE off 0x0064591c vaddr 0xc063591c paddr 0x0063591c align 2**2 > filesz 0x00000054 memsz 0x00000054 flags --- > > Signed-off-by: Christophe Leroy Acked-by: Segher Boessenkool Thanks, Segher