From mboxrd@z Thu Jan 1 00:00:00 1970 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=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 7CC46C2B9F4 for ; Thu, 17 Jun 2021 22:08:20 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5C3B16128B for ; Thu, 17 Jun 2021 22:08:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C3B16128B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB37182B55; Fri, 18 Jun 2021 00:08:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (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="pq5WKQTy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 949FC82B48; Fri, 18 Jun 2021 00:08:04 +0200 (CEST) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (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 A0D2482B33 for ; Fri, 18 Jun 2021 00:07:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82c.google.com with SMTP id z4so6046858qts.4 for ; Thu, 17 Jun 2021 15:07:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=b+Z7nx1CvF0BAV90+/xBHoCXiPlt+ejzZorP8xGNGmQ=; b=pq5WKQTy27RcZxRjRTV0KrSQjvGMDKMCwfXV5wBfDFvZM/uHGCHfy5kEG0TpG/Q2Uk cqqnXELbV2IBe6o5m0ZmFNVE58gfmg8R0Pu5Yo9fJCuwQBHQZhvoNEXxGp/W2QYmlOsJ /S5xl5OFBBmTpBgVCrcXd+7MgxLNbyJemM+5g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=b+Z7nx1CvF0BAV90+/xBHoCXiPlt+ejzZorP8xGNGmQ=; b=nQ1W83u0RwKOORKOO0LgXs01p9iGHzSvRpzlgRCw01g1v0g5xYMyXo/MZlaCvivsN6 9Gtr1R3lSz1BBVU9FagrC5JUT4hBMZDmSo+UPJl3H1vF9ZwdoPiKX7TI0ipWiZNWyrlu 7I2wwIwxHl8UUMpfPjMOKeXP7TKt3Y5kFk8m4VFhHeJyV4k5yRLTKkPW0RvdZ5gKFFS7 aCXb0ykfp5T1eqClAol+1vogIeEK8EMYbjDnrwsJR9IHs8sLv/hnT8/Vdu9OWpYU/kdq ThHu2nEB0D6j2iy8rswtwYgLwReTyKsgZna4GVcywrq36ozt8wObpDySmOD890hL5za9 DZsg== X-Gm-Message-State: AOAM530jmfO/iHtVi4O7GgCFZjVWwRApWVfNYPKDFGUdXf+3gvsxwIM9 XF7Q9/ZWvLiBJSqOQ6N7G2sOZPIUjGvKCg== X-Google-Smtp-Source: ABdhPJwMfC6tpBEVwmUauGkbAV2IYp7rklh45gFgfFsfTqkIOiDCF4wSwvfr/UedVai9skOls/iEkA== X-Received: by 2002:ac8:5550:: with SMTP id o16mr7484152qtr.387.1623967677442; Thu, 17 Jun 2021 15:07:57 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-143e-7f00-f95f-8895.res6.spectrum.com. [2603:6081:7b01:cbda:143e:7f00:f95f:8895]) by smtp.gmail.com with ESMTPSA id d124sm1695859qkf.54.2021.06.17.15.07.56 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Jun 2021 15:07:56 -0700 (PDT) Date: Thu, 17 Jun 2021 18:07:55 -0400 From: Tom Rini To: Bin Meng Cc: Simon Glass , u-boot@lists.denx.de Subject: Re: [PATCH] x86: Discard .note.gnu.property sections Message-ID: <20210617220755.GP9516@bill-the-cat> References: <20210617161228.30746-1-bmeng.cn@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3aEv9z0+6wZDuq0b" Content-Disposition: inline In-Reply-To: <20210617161228.30746-1-bmeng.cn@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean --3aEv9z0+6wZDuq0b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 18, 2021 at 12:12:28AM +0800, Bin Meng wrote: > When switching to kernel.org x86_64 gcc 11.1.0 toolchain, u-boot.rom > built from qemu-x86_defconfig no longer boots anymore. Investigation > shows that U-Boot fails at a very early stage during the boot process, > in fdtdec_prepare_fdt() where fdt_check_header() complains that there > is not a valid device tree found at gd->fdt_blob which points to _end. > Now _end points to an allocated section .note.gnu.property which of > course is wrong. >=20 > This issue is however not seen when using the default Ubuntu 20.04 gnu > toolchain (gcc 9.3.0 with binutils 2.34). Further investigation shows > that it is caused by a behavior change of binutils v2.36 which is part > of the kernel.org gcc 11.1.0 toolchain, via the following commit: >=20 > 939b95c77bf2 ("Linux/x86: Configure gas with --enable-x86-used-note by = default") >=20 > In fact, there was already a regression bug report [1] for binutils two > months ago, but the binutils folks did not think it is a bug :( >=20 > To resolve this, there are several options: >=20 > * pass -Wa,-mx86-used-note=3Dno to gas > * pass -R .note.gnu.property to objcopy > * discard the section in the linker script >=20 > Linux kernel uses the discard way [2], so let's do the same for U-Boot. >=20 > [1] https://sourceware.org/bugzilla/show_bug.cgi?id=3D27753 > [2] commit 4caffe6a28d3 ("x86/vdso: Discard .note.gnu.property sections i= n vDSO") >=20 > Signed-off-by: Bin Meng Reviewed-by: Tom Rini --=20 Tom --3aEv9z0+6wZDuq0b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmDLx7oACgkQFHw5/5Y0 tywmDAv+I85fOIn+38Y62bxhRJrGkz5T2ozgJZmlEw2R4pmxu0T1dsgA4leDIizP ygJ+EnBEXXYa3iVHbhbgDxTjj+d07lPlSmZvRvFNU/np2sG1iLf/ggnETKS6TKt/ tZU32/1ifH3D/0YjbiHnRynviuL0N2+l7BAeqXtwd8vbSCVRsPOzD4L5DuwZ+iNR rtyemxgdgzQ3uvPLdonalr/WGgzt8anjF+h3awjD1QZdplZt+19iypK1PmNBmwOI KyII+n2t2jl+CtOnpFPgwjuc9yDW7glpSd+ezBm3CbKEkqADruGbVDoegtzE4IDl vq8koWYaMDP1VPEF5JMyJzGL96JeYc6HlN9RvUGLS5s59VKkney2KVFJY04wNH4v /nMU51ecp8Z8/v+3gfdfvoPwyqtsdMt5bbpt+eYEOhvCMF0SOZQvkCyIWSpdJ77H clU9VE4st036y6x8nHEeaH/fBRn43M8b4Ei+4iWSgyIChijhpd2agF1xla5loujU AAWrESw1 =cYhf -----END PGP SIGNATURE----- --3aEv9z0+6wZDuq0b--