Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6BF76C00145 for ; Mon, 12 Dec 2022 14:00:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3FB0E85429; Mon, 12 Dec 2022 15:00:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="ZVrpBfkO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 830D0853A9; Mon, 12 Dec 2022 15:00:40 +0100 (CET) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DB6B0853A9 for ; Mon, 12 Dec 2022 15:00:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x830.google.com with SMTP id cg5so8950086qtb.12 for ; Mon, 12 Dec 2022 06:00:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Ex1IlBmcwYh4Z0dvqOs++K52m22u6pctl9wquvu2Yno=; b=ZVrpBfkOAqhzzTqNA3z5Nb6haCRMU9/kgZ8q+E8xWPkDxEqlF8bKz3he8+LtI1Oweo QqgqdZp8IWxt7hxOhkXuiovbNMhPACSgtocNHmqrQeAgvm9kcSWJ8cgB9uOuUFIrZ27Y 6Usfcd99l3yKZjpbhoyh5PM9km7w6zczvS31g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Ex1IlBmcwYh4Z0dvqOs++K52m22u6pctl9wquvu2Yno=; b=mZjzMVmgPWZXceoSN9r/AuVFL3WJiRmHdXjKEyK2UvCrKHqaA3l88JDW7GQPR/2qUm Twwv03vbTmGPSTS40kzdDClBfcbRJyZVigmbnjoDPmrdzoY39gnYSZUVoKhDeJ7bk+FO r5b9hvZWkhL9G9dCGCemiwEjOxoABm1Wh7CFuh3k54vT8t6ShFDIW9EkykpAMEj9QMk+ DTe73snICva4ADc/NEbc8lwz6yzJpTi20l+wKRxihn+YuDwMDSK69c7nQNz181TBl9pb hPkNlQAKCtSZLFfIT1TMCcLEpZuuhFfhWKR1kebautF5xwnIhsdurMEKxT4TbJWMES7V Qs7Q== X-Gm-Message-State: ANoB5pkysekpdbiiIQPUHC4YCPgtHdnNnJk4GbR7yVQ0n57eT5l+a953 ZlpADJ7WjQVlQLlYVfFKSIyQuw== X-Google-Smtp-Source: AA0mqf6OSbPsXvjyqVG23h2388ti9eN69pzijqUkre3Ui15S++mKWPsrDGGWb8HJmOIt2dIKTIM3DA== X-Received: by 2002:ac8:6e84:0:b0:3a8:1c63:7603 with SMTP id c4-20020ac86e84000000b003a81c637603mr1516997qtv.57.1670853634862; Mon, 12 Dec 2022 06:00:34 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-8c5e-02dc-44a6-fa90.res6.spectrum.com. [2603:6081:7b00:6400:8c5e:2dc:44a6:fa90]) by smtp.gmail.com with ESMTPSA id bp12-20020a05620a458c00b006fef61300fesm5990058qkb.16.2022.12.12.06.00.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 06:00:31 -0800 (PST) Date: Mon, 12 Dec 2022 09:00:28 -0500 From: Tom Rini To: Max Krummenacher Cc: u-boot@lists.denx.de, Adam Ford , Pali =?iso-8859-1?Q?Roh=E1r?= , U-Boot STM32 , Patrick DELAUNAY , Patrice CHOTARD , Max Krummenacher , AKASHI Takahiro , Du Huanpeng , Heiko Thiery , Heinrich Schuchardt , Marek =?iso-8859-1?Q?Beh=FAn?= , Quentin Schulz , Samuel Holland , Simon Glass , Stefan Roese Subject: Re: [PATCH v5 1/1] u-boot-initial-env: rework make target Message-ID: <20221212140028.GR3787616@bill-the-cat> References: <20221128084122.3456680-1-max.oss.09@gmail.com> <20221128084122.3456680-2-max.oss.09@gmail.com> <20221208202410.GN3787616@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9ZK/CtYg56DKcyDv" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --9ZK/CtYg56DKcyDv Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 12, 2022 at 02:39:09PM +0100, Max Krummenacher wrote: > Hi Tom >=20 > On Thu, Dec 8, 2022 at 9:24 PM Tom Rini wrote: > > > > On Mon, Nov 28, 2022 at 09:41:22AM +0100, Max Krummenacher wrote: > > > > > From: Max Krummenacher > > > > > > With LTO enabled the U-Boot initial environment is no longer stored > > > in an easy accessible section in env/common.o. I.e. the section name > > > changes from build to build, its content maybe compressed and it is > > > annotated with additional data. > > > > > > Drop trying to read the initial env with elf tools from the compiler > > > specific object file in favour of adding and using a host tool with > > > the only functionality of printing the initial env to stdout. > > > > > > See also: > > > https://lore.kernel.org/all/927b122e-1f62-e790-f5ca-30bae4332c77@foss= =2Est.com/ > > > > > > Signed-off-by: Max Krummenacher > > > Acked-by: Pali Roh=E1r > > > Reviewed-by: Simon Glass > > > > Applied to u-boot/next, thanks! >=20 > The commit not only fixes the use case on arm64 with LTO enabled, it also > fixes sandbox for x86-64. For me on Fedora with a `gcc (GCC) 11.3.1 20220= 421` > both `make sandbox_defconfig; make u-boot-initial-env` and > `make sandbox_defconfig; ; make u-boot-initial-env` fail wi= th > ``` > GENENV u-boot-initial-env > objcopy: env/common.o: can't dump section > '.rodata.default_environment' - it does not exist: file format not > recognized > sed: can't read u-boot-initial-env: No such file or directory > ``` >=20 > Wouldn't that merit applying the commit to master, i.e. include it in v20= 23.01? You can just disable LTO, and it's been an issue for a while now. It's also easy enough to cherry-pick if there's cases out there that can't wait. Thanks again for addressing the problem! --=20 Tom --9ZK/CtYg56DKcyDv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOXM/wACgkQFHw5/5Y0 tyysCAv/RzKcnSlRh5TXmkTTXH5ylyV51c8rLxA+bmannyzwxYe9uSbndZSGNpTm jJIuiYX16uGvV2cehu16HaWMf1BD84kpIfX2y8iOEzrTWGCgJHi9G+mz7X/F71K+ xWSu+iGl+Te+MzEPYP/lvjkQluGeYYcqP1GOfYzGdVscaWey76g0P6xAza60XORO UXI/MoQ36SvsosrGvFyiaRUIXwEHm46FbsI/FXwP9xm0p99MvW3wQQ3mAaP7v91H +QKujWwzkFSmFpnTVhZFM2t0jbGfTD08nPNG6zvn0/5UDbWTFMiwr9OzXFm3RtlR EGBKVGZMvB4z+qh5gsxIeYzojT4um9QIAArDZU2Dq9jf6YdVGWPlorwn+pqLsYPl 5MPpubpit2tVJT7Vof311BrfKawcvb6/1gosDfvbg2z3rEAvvbxcKIzgilhO0/ql VS7RN4TomUrjztuEdkVfy4ykKWlZeE44Zey3k6tjtHsrsFiAEVJX0XQ0oGxVO7vK 9icY941r =WAO6 -----END PGP SIGNATURE----- --9ZK/CtYg56DKcyDv--