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.2 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,URIBL_BLOCKED,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 84AEEC2B9F7 for ; Tue, 25 May 2021 00:56:58 +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 06D0B613D6 for ; Tue, 25 May 2021 00:56:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06D0B613D6 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 D39B982F74; Tue, 25 May 2021 02:56:22 +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="tP6jPPdr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6951282F42; Tue, 25 May 2021 02:56:21 +0200 (CEST) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (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 5B2E882F30 for ; Tue, 25 May 2021 02:55:31 +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-qk1-x72c.google.com with SMTP id j189so8064064qkf.2 for ; Mon, 24 May 2021 17:55:31 -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=Kvl/KdmaMGNgKklugDlU09SkklVRaTFqSJhRRrgsyFI=; b=tP6jPPdr/R9xfAzn+vs8wlNmZkkSfTbBkF5kBtJoHsvWqJQVxMlCBnppzgu4bVcpIF aDwdeE0rGfiGN4fSPdJ01cUF7usmXSjrxjpq+3NyCFqj6UWtHhQKUtd6u4RnGMcAbQnF nlkE1BhBmoOf7h65tGTTtlieMMuNdD43BINwY= 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=Kvl/KdmaMGNgKklugDlU09SkklVRaTFqSJhRRrgsyFI=; b=g38qovaF8GG2Rh9jGjgDvOyR4qzQvsjPFiR1fQx0/IELLjytPz7XS88KPdJXHwrGAI C3F33A7uydpLkZhjxgVkRkPXgJQ81d2SZmyIYPqXdyQNJJq6Esb4owHVjU91upJnEtei 9PFU6OQoyFn02/08XhNUBTfDViioUbeQdM0GHk6E/zPRqzlfxrbcaMp0/3fOM3NATV5A IDfs0hExHRHAaXrAf2RKfYN/M1ww1fWpAs5O/NOtLPwdnL8wc+2U7zGAhBnPfAtvjekQ a9W7+dQ5ytFLIe17LSotMEqxu9ZYekqYTkSGX2k4i/FywoZHyhamlRDwbFk761RtSLI2 YiWw== X-Gm-Message-State: AOAM530Fg5PkrSkkqyitvobqOwBXRJCX6SqUlwMPo49bF6fzQQrRwv7m prmXfMPPCKCaqa/HmExMvpKIGQ== X-Google-Smtp-Source: ABdhPJzfxlMrzc6HjuNGVY2XrYOqWc0le8qvRp1zsv0U2jTVwCk1DkC3INjj+zune4rtUCuwgZnj9w== X-Received: by 2002:a05:620a:48e:: with SMTP id 14mr30243450qkr.145.1621904130258; Mon, 24 May 2021 17:55:30 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-5ce8-9acb-4a3a-47a0.res6.spectrum.com. [2603:6081:7b01:cbda:5ce8:9acb:4a3a:47a0]) by smtp.gmail.com with ESMTPSA id j28sm11974643qkl.35.2021.05.24.17.55.28 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 May 2021 17:55:29 -0700 (PDT) Date: Mon, 24 May 2021 20:55:26 -0400 From: Tom Rini To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: u-boot@lists.denx.de, Simon Glass , Heiko Schocher , Patrick Delaunay , Patrice CHOTARD , Miquel Raynal , Pali =?iso-8859-1?Q?Roh=E1r?= , Stefan Roese , Heinrich Schuchardt , Alexander Graf , Marek Vasut , Neil Armstrong , Ryder Lee , Adam Ford , Bin Meng , Harald Seiler , Tim Harvey Subject: Re: [PATCH u-boot v4 13/36] build: use thin archives instead of incremental linking Message-ID: <20210525005526.GT17669@bill-the-cat> References: <20210520112425.25166-1-marek.behun@nic.cz> <20210520112425.25166-14-marek.behun@nic.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lxUq3bEa41V0yEQ7" Content-Disposition: inline In-Reply-To: <20210520112425.25166-14-marek.behun@nic.cz> 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.102.4 at phobos.denx.de X-Virus-Status: Clean --lxUq3bEa41V0yEQ7 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 20, 2021 at 01:24:02PM +0200, Marek Beh=FAn wrote: > Currently we use incremental linking (ld -r) to link several object > files from one directory into one built-in.o object file containing the > linked code from that directory (and its subdirectories). >=20 > Linux has, some time ago, moved to thin archives instead. >=20 > Thin archives are archives (.a) that do not really contain the object > files, only references to them. >=20 > Using thin archives instead of incremental linking > - saves disk space > - apparently works better with dead code elimination > - makes things easier for LTO >=20 > The third point is the important one for us. With incremental linking > there are several options how to do LTO, and that would unnecessarily > complicate things. >=20 > We have to use the --whole-archive/--no-whole-archive linking option > instead of --start-group/--end-group, otherwise linking may fail because > of unresolved symbols, or the resulting binary will be unusable. >=20 > We also need to use the P flag for ar, otherwise final linking may fail. >=20 > Signed-off-by: Marek Beh=FAn > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! --=20 Tom --lxUq3bEa41V0yEQ7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmCsSv4ACgkQFHw5/5Y0 tyxMeQwAsO9O+/SMmfgKDr8mLXFWqb5qa9EGnRLiKzmaHqJhvTw9/EgIXoOjUMRl 2RBLk46+9FXlXstZwLzuACeY/mTp+AI7FeuA2qUwGkCc+jCsIiDLk4OhNQSJNs9W YoVSI+yResKnYUdFnNiYdzpC0Aay47watLSrvuFDfAL1HsaWuIBsE03oJOm4ZRSg L5R0+m29zSWUphWqR0Tk3ZqRu2aJ8Fb8DfkuWmSLLEIPR5nFormmyeteOgwIr56l 48/n5yFEW34/DXp05bmUm4AHj+jtgYowVCA2KIfsMxAOcjCoarcCEU5wgIn5256G tOYBbcQRTIK7q+ez+Y9YmT7e8bEdEOcGBnOBCWE4WQdSreLwwNKh2nIzX1v5asVT 6J/4yk0Zb0pbtMk+pfAD1pH/3G5SVVBtllrqajrH2V1cPpKssHkDuYzGb0uP7ngU W6SNWCyh6hw4mEXBryG5V1TZiTTaDa3gCDw6V/XzKLPx+38qx5QL3VjGe5Ml7TMY TqeeEA89 =Uj/p -----END PGP SIGNATURE----- --lxUq3bEa41V0yEQ7--