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=-15.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 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 1BAD6C1B0D8 for ; Thu, 10 Dec 2020 14:48:11 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CB4B022D74 for ; Thu, 10 Dec 2020 14:48:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB4B022D74 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.49381.87321 (Exim 4.92) (envelope-from ) id 1knNEe-0006OF-Al; Thu, 10 Dec 2020 14:48:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 49381.87321; Thu, 10 Dec 2020 14:48:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1knNEe-0006O8-7H; Thu, 10 Dec 2020 14:48:00 +0000 Received: by outflank-mailman (input) for mailman id 49381; Thu, 10 Dec 2020 14:47:58 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1knNEc-0006Nz-Dp for xen-devel@lists.xenproject.org; Thu, 10 Dec 2020 14:47:58 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2a602a9f-1e80-4b97-ae45-2a8e3a16367e; Thu, 10 Dec 2020 14:47:57 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2a602a9f-1e80-4b97-ae45-2a8e3a16367e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1607611676; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=YzBzMUXp40/RwzVqdRyq4Gso6zKiB40x+XQEEGsH8F0=; b=AxJp8h+bAwzhs/56lbiBbp1Q/ncIpG+cXLhF/v3JcvZ9j0w+fOxe0JKu ueqzBKiHnZbog1se5rEGAqRt24FZLv//f8g3ytBiqgOp2nssdQWXGChS9 1t60Q0PbhIfSdWms6wOTdvfnocHNvxWg7iSsfm6qGr/nzBEDmXib1R1bl w=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: kaIvGIlSdtH5/bvCFkYR+gHHmNFG/3Dkbiw3RymXSDvdRv3TRqUMZfnBRo5vWj4MJ9DKJpqc76 v04pTj08/IbCZwun5nXyYsjamo0vUsHqFP1J+3dFrXGjCPFfV7xlpZJ3UuAIMzYuWTq7pKa6em L5ejrR7NYQiU54OrDntaxfEzB5KkSqDBnUIaLBASE1y10dUV2wwbuLuASdzwTjhr4L9jHlrY60 QZIUrVllYBTSlJEXOoN/SQE4Ua6Stu3z9LTF1/QQ3SMf6RWeKKYe00eGh5ZC5uEWSMmrc1GSM+ brw= X-SBRS: 5.2 X-MesageID: 32957099 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.78,408,1599537600"; d="scan'208";a="32957099" Date: Thu, 10 Dec 2020 14:47:52 +0000 From: Anthony PERARD To: Jan Beulich CC: "xen-devel@lists.xenproject.org" , "Andrew Cooper" , George Dunlap , Ian Jackson , Julien Grall , Wei Liu , Stefano Stabellini Subject: Re: [PATCH v3 2/8] lib: collect library files in an archive Message-ID: References: <1a6bac6a-7d83-f5b6-c5b9-8b3b39824d40@suse.com> <21714b83-8619-5aa9-be5b-3015d05a26a4@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <21714b83-8619-5aa9-be5b-3015d05a26a4@suse.com> On Mon, Nov 23, 2020 at 04:21:19PM +0100, Jan Beulich wrote: > In order to (subsequently) drop odd things like CONFIG_NEEDS_LIST_SORT > just to avoid bloating binaries when only some arch-es and/or > configurations need generic library routines, combine objects under lib/ > into an archive, which the linker then can pick the necessary objects > out of. > > Note that we can't use thin archives just yet, until we've raised the > minimum required binutils version suitably. > > Signed-off-by: Jan Beulich > --- > xen/Rules.mk | 29 +++++++++++++++++++++++++---- > xen/arch/arm/Makefile | 6 +++--- > xen/arch/x86/Makefile | 8 ++++---- > xen/lib/Makefile | 3 ++- > 4 files changed, 34 insertions(+), 12 deletions(-) > > diff --git a/xen/Rules.mk b/xen/Rules.mk > index d5e5eb33de39..aba6ca2a90f5 100644 > --- a/xen/Rules.mk > +++ b/xen/Rules.mk > @@ -60,7 +64,14 @@ include Makefile > # --------------------------------------------------------------------------- > > quiet_cmd_ld = LD $@ > -cmd_ld = $(LD) $(XEN_LDFLAGS) -r -o $@ $(real-prereqs) > +cmd_ld = $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %.a,$(real-prereqs)) \ > + --start-group $(filter %.a,$(real-prereqs)) --end-group It might be a bit weird to modify the generic LD command for the benefit of only prelink.o objects but it's probably fine as long as we only use archives for lib.a. libelf and libfdt will just have --start/end-group added to there ld command line. So I guess the change is fine. The rest looks good, Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD