|
[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
On 17.06.2026 13:20, Andrew Cooper wrote: > On 17/06/2026 11:37 am, 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. > > I wasn't even aware of that behaviour. > > So we've got even more completely undocumented and obscure toolchain > restrictions and behaviours. > > What else? It needs at least enumerating somewhere so people stand a > chance of being able figure out which toolstack they need in order to > get a functioning xen.efi. The two ways of generating relocations exist to allow people to build a functioning xen.efi irrespective of GNU ld version used. Hence it's not quite clear to me ... > I'm going to insist that a doc happens, and that this patch patches it > adding in the Binutils 2.46 requirement. > > But I'll write the doc if you can summarise the other checks I'm not > aware of. ... what exactly you want to document. The change here is towards secure boot support; outside of that xen.efi is operating okay in this regard, afaik. The first paragraph of docs/misc/efi.pandoc could do with an update (as the version restrictions are now obsolete), but it was my understanding that the secure boot related aspects all would live in a new, to be created doc (which iirc you already have in flight). Besides the .reloc filling, the other check we have is for whether to include debug info. As with the documentation on toolchain versions required, the MS ABI check could likely be dropped now as well. Otoh the "linker supports PE" check of course needs to remain. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |