[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.22?] x86/EFI: arrange for non-discardable .reloc in xen.efi
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Wed, 17 Jun 2026 12:53:23 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=jthMzj7OmyhgY2i+pIhL/u2rZtxKj1FxIx8XZffGD2k=; b=tgn3eoH407+sAlFVdkcz9kWpg8KRXMTjYrgH52rV6ZPdO2j81y4iaDcWUScqW2Mi+jmwZXT8k6lmPDCTp+ucjFoyzXkK8NTs1ciwtbTL/JDuSKhdlLTT8bDyRaI1B4pNS40SqU7miDu1tEi9hyhZTJo++8NgFn8SLNoA2oGAZYy2ZwQlKJt88qRVciwE7QkOEQOaK1B7RXEjjpsmtDiYbCnNWDPLib7WzwlxvwSUcjgmW4fiZuXJXtdXEc1qiJf8IZwFkuox0fuCJkVV6ROvdHNBY1ThBwZLWYEWh0um5tk2R8VswzzXD7w/LTsgeLnkLVVkjGEjatCRltMr3tGa8w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kgbdXcoDOts57phcD+Kz2zRDnu/LBeU9WwIA0AnY21Wa7xRf3HIlHPcWtA+5nZvJdlSmmFZpGO15EG6GDfln2clHzviiLjcJizZ2PSQc42boz8B19C/qndenA7Tvz3Zf3sw1f9Ug4EfuuD70y6kDrS28lJLgO3MKJEwFg0YPywxlFlyyXIhkDA6/wjTRd6vCFKgenkjpb3wg8EjmtNi8iscvzdPVksIhx6N6FiaAZ/S7HB/SDxEA0uHmn5X7S7ZmHK2KCCY8i3PTCszlPuGYrXcZLt1oA7u4R2yCPYkPZF3hqFLxKQQSo4WZpIB3N2fj7cpLQUwMxg8fXB+ISlXqAA==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Marek Marczykowski <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Daniel Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Delivery-date: Wed, 17 Jun 2026 10:53:39 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Jun 17, 2026 at 12:37:38PM +0200, Jan Beulich wrote:
> On 17.06.2026 12:29, Roger Pau Monné wrote:
> > On Tue, Jun 16, 2026 at 06:17:54PM +0200, Jan Beulich wrote:
> >> Loaders respecting IMAGE_SCN_MEM_DISCARDABLE would not load such sections,
> >> yet we need to access it ourselves when switching out of "physical mode".
> >> Leverage behavior new to GNU ld 2.46: Any contribution to .reloc which
> >> doesn't have the discardable flag set (which cannot even be expressed in
> >> ELF) will yield the output section also non-discardable.
> >>
> >> Since for intermediate binaries we don't care about section attributes,
> >> link in the new object only on the final linking pass.
> >
> > I'm not sure I follow. Xen already does generate a custom .reloc
> > section without the IMAGE_SCN_MEM_DISCARDABLE attribute when using
> > the mkreloc utility, and hence the .reloc section should never be
> > marked as discardable?
>
> mkreloc is used only when we recognize the linker to be incapable of
> producing (correct) base relocations. As a modern linker is required for
> the desired IMAGE_SCN_MEM_DISCARDABLE handling for .reloc, mkreloc
> wouldn't normally be used there. Hence no .reloc section with the wanted
> property.
I see, MKRELOC becomes ":" then, I didn't catch that.
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Thanks, Roger.
|