[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/8] lib: collect library files in an archive


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 9 Dec 2020 14:46:34 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C8NIOMcqO2YuIZ25ESTOtw60WrM6U29ULZLouwF2GZY=; b=S4sYTj1zu4Ob9E0W/CLhpXvIKi3lEW0ZMHgzhDvzJkqQmB3piXV8oYmkYNcadVaDZGV5kc4X//MHQoE3okYVhqNdvl0j7zjj6WQyyhN4YVycKqQHay6B87Ah44k10kYFnrmGEOzZr9jicZ8xLC10GSSiHgZ3cW1CrdL5a1FEIdteYvGNnH70e5jVKDKEYvA4Vtjzpowr4xy3Q+aYnQ7bgrHIGlaZhHxigrryUCBlocZEZnrQ3Iej8pZmSBT9IE5Lhxzbx+vedm5ud78WieQtY3h3lZ3Bo//rm4MUV7z/oxYUS+eefe3SMGE4WYDeFWjcQTHE3ynD9XAvIujSSIOkpg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TA8mqwJqJKiu3JKuCdH2cMK042j0QPhayaTLXM+04bKYKfZP5rkDJQV80xTQii9iB81dF8N20GZaddI0wN/CKP/FHMeJ/NNq9AiJGdu6UAs1ZmCCyEsyo52AldJKI6COubuqSk3MvCAu+n9casE85hL7M2hsXo2NyI66PaZLBJCwFt9uF4mmLIaECuOcqAsU9gIkBVQIjBZLXT2QMeIoHmfSbgA0p7RD20HRrY+qioOix7o5JFuV78wImV1PSAwNLk5TJ1K5FbHJHWJwmhZgDcSq5T/aby3Mwp1lnADQ0dvH0W2dwxNO2t4WzrmYZgFMiLSWWupEivVFoBaw1IcYuA==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Wed, 09 Dec 2020 14:47:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWwaxzwnlkqyYO/Ea2tJ3MHVbjvKnuvCIAgAAzoYCAAAERAA==
  • Thread-topic: [PATCH v3 2/8] lib: collect library files in an archive

Hi Jan,

> On 9 Dec 2020, at 14:42, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 09.12.2020 12:37, Bertrand Marquis wrote:
>>> On 23 Nov 2020, at 15:21, Jan Beulich <jbeulich@xxxxxxxx> 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 <jbeulich@xxxxxxxx>
>> Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
> 
> Thanks.
> 
>>> @@ -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
>> 
>> This might be a good idea to add a comment to explain why the start/end-group
>> is needed so that someone does not change this back in the future.
> 
> Since we're trying to inherit Linux'es build system, I did look
> there and iirc there was no comment, so I didn't see a basis for
> us to have one.
> 
>> Something like: put libraries between start/end group to have unused symbols 
>> removed.
> 
> Now that's not the reason - why you describe is the default
> behavior for archives, and there is something like a "whole
> archive" option iirc to change to a mode where all objects
> get pulled out. Instead this is a symbol resolution thing
> aiui - by default earlier archives can't resolve undefined
> symbols first referenced by objects pulled out of later
> archives.

ah yes i remember seeing that.
Maybe just add your last sentence in the commit message.

Cheers
Bertrand

> 
> Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.