[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 16:08:53 +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=FCbFunXq3c2JMvBpJfTVRPoI07SaqOTI/5QgAngRxT4=; b=Y/r9C83GXzLcOFK7Y6GE7k6W4bF4z7pjoKl+p9RH5daY0s2dEklmv7PWJbUzLXEywyNnE0i/lFZdCBYpGj/gBqdrTnEDDEUOGKky9lmOuzoOL/277NLmvHrR/xwrBsbgRsU2tGLuRK8UH1XlG08PAemC/SsMh/GfNmojFdX3rZLp97UVG7mmwRsPwlRyymW04X78iZ32Ha4cNnISM539DqirlXdsPv3tN1VAWlTPXJB9Elzz0wu1HKK6HJjTk3jIPkw2JZJcTw1hVVreapVQBd3BWhtmDkmjZSP5eaAb+xHnjHKyfz7SCETksnvnORN+s5WCEClpuZ/dwF2NV+xhGQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dDE/+ni+530ahZto0ySYotFJ6gK7dKgPaCBFYH18xXlBYG62Y9ZlnThizumGjChgKfr8kwlv8q0diin+o3uaYa9kyJKEa70SbEuO9axyjR0LQnL3te+JwS2hqWL2/b44nFLa5n+KMjMK6XTIH2S2x1/kAXMh3p1aH8fc6IDbYgRTRnl6nf/1vuZ7QV8RKwwDqZQdTNKuqVA8huv1TQ7gh70IixGzETN25FzVBfKk0yjwgIru/N2r4GkkPFtg3XxkCxhlubru0yaUevOkrFjvNquSywMLiWsibWWzDal51iCRKhlNSLvxfEEmFvkF8uQPJtEW2GhDnrqp+RzGLO1kqA==
  • 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 15:09:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

Jan




 


Rackspace

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