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

Re: [PATCH v3 1/2] xen/build: put image header into a separate section


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 8 Mar 2022 17:54:22 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Das1Cc0UZsMKw8U+GV+gAfi+gqzVBn1FjHp8HOYO4p0=; b=WsxGgl0yenSWWPFo1pzGfVWvUXOi39eZZTPOzI4ScmpMBuLHkknjklkMRMOjV2rKSih13BmjvrsI/MNJAj6RQTLTxl/94R/YOBm+L1azb5OcAiWeeuqiXi9BQq3SgGfl04/8Uos8WDxZqvzQfHBfvJVbvqPF9Hlkir0XbzI96plL7fOSeVI7y/xUudP835gPB3ZFfWS6apoub11nFumuHtY/QQ6ukq6+U0Pou8ZiqpblmCdayxskkegmrpE31H1pnPjlDBXnmSb5Tg+XhBmAiEctXUJBFfIyNAgehcSTSERZuC6LWtUziS3wgfuF2XIQbynej80yot+QB82AfWjqtQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YAyow/pHDP8SZKy7/9zFIdVXTB0irYMRdSaATz4Lva3b1+pRDy0wZEIblsP+tev+iX+RJO8td2cOmfBbIaVXgdNvXTS/XXYfK/Z/tqwmooaChKpg6BdIITa3AyJEYeK82hO+YZZzYSaBLWQZHGt4j22dV7QGRFld7zCeNcTn3CTJB+Uro3ouuGfnoCcDVzVKt+AeJ/A65VHWnQVnmIoNvoxbMjm+yCwFXicaGvKHNtRCZMMaV0QYT0GZFnuROJx6sWEUCPdWwefJsjRVKQFRJuRqXSzbbuDM/Z/ElJTCg7SzQEiAv6pkL0gbiB+Wqwz4TeM56QwgRy/b5Dx4EJE2vA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 08 Mar 2022 16:54:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08.03.2022 17:36, Roger Pau Monné wrote:
> On Tue, Mar 08, 2022 at 04:08:53PM +0100, Jan Beulich wrote:
>> On 08.03.2022 15:18, Roger Pau Monné wrote:
>>> On Tue, Mar 08, 2022 at 02:57:23PM +0100, Jan Beulich wrote:
>>>> On 08.03.2022 14:49, Roger Pau Monne wrote:
>>>>> So it can be explicitly placed ahead of the rest of the .text content
>>>>> in the linker script (and thus the resulting image). This is a
>>>>> prerequisite for further work that will add a catch-all to the text
>>>>> section (.text.*).
>>>>>
>>>>> Note that placement of the sections inside of .text is also slightly
>>>>> adjusted to be more similar to the position found in the default GNU
>>>>> ld linker script.
>>>>>
>>>>> The special handling of the object file containing the header data as
>>>>> the first object file passed to the linker command line can also be
>>>>> removed.
>>>>>
>>>>> While there also remove the special handling of efi/ on x86. There's
>>>>> no need for the resulting object file to be passed in any special
>>>>> order to the linker.
>>>>>
>>>>> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>>>>
>>>> Looks good to me, but I have one question before feeling ready to
>>>> offer R-b:
>>>>
>>>>> @@ -86,8 +84,13 @@ SECTIONS
>>>>>         *(.text.kexec)          /* Page aligned in the object file. */
>>>>>         kexec_reloc_end = .;
>>>>>  
>>>>> -       *(.text.cold)
>>>>> -       *(.text.unlikely)
>>>>> +       *(.text.cold .text.cold.*)
>>>>> +       *(.text.unlikely .text.*_unlikely .text.unlikely.*)
>>>>
>>>> What generates .text.*_unlikely? And if anything really does, why
>>>> would .text.cold not have a similar equivalent?
>>>
>>> That matches what I saw in the default linker script from my version
>>> of GNU ld:
>>>
>>>     *(.text.unlikely .text.*_unlikely .text.unlikely.*)
>>>
>>> I really don't know what could generate .text.*_unlikely, but since
>>> it's part of the default linker script I assumed it was better to just
>>> add it.
>>
>> I've checked - gcc up to 4.5.x would generate .text.*_unlikely; from
>> 4.6.x. onwards it would be .text.unlikely.*.
>>
>> As to the dissimilarity with .text.cold: I wonder why we have that in
>> the first place. It matches our __cold attribute, just that we don't
>> use that anywhere afaics.
>>
>> In any event:
>> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>> albeit preferably with .text.cold.* dropped again.
> 
> Would you mind dropping the .text.cold.* at commit? Otherwise I can
> resend.

Sure; no need to resend just for this.

Jan




 


Rackspace

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