On 06/08/2020 10:05, Jan Beulich wrote:
> We're gaining such sections, and like .text.* and .data.* they shouldn't
> be present in objects subject to automatic to-init conversion. Oddly
> enough for quite some time we did have an instance breaking this rule,
> which gets fixed at this occasion, by breaking out the EFI boot
> allocator functions into its own translation unit.
>
> Fixes: c5b9805bc1f7 ("efi: create new early memory allocator")
> Signed-off-by: Jan Beulich <[email protected]>Acked-by: Andrew Cooper <[email protected]> > --- > This likely has a (weak) dependency on "x86/EFI: sanitize build logic" > sent several weeks ago, due to the new source file added, as explicit > dependencies upon the individual objects in x86/Makefile go away there. > > --- a/xen/Makefile > +++ b/xen/Makefile > @@ -355,7 +355,7 @@ $(TARGET): delete-unfresh-files > $(MAKE) -C tools > $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h > [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm > - [ -e arch/$(TARGET_ARCH)/efi ] && for f in boot.c runtime.c compat.c > efi.h;\ > + [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo > *.[ch]); \ > do test -r arch/$(TARGET_ARCH)/efi/$$f || \ > ln -nsf ../../../common/efi/$$f arch/$(TARGET_ARCH)/efi/; \ > done; \ Maybe not for this patch, but we need to start removing this (and other) symlinking in the tree for proper out-of-tree builds to work. AFAICT, this logic predates both Kconfig and x86's blur into having EFI support in xen.gz. Can't we remove all of this by having CONFIG_XEN_PE expressed/selectable properly in Kconfig, and gathering all the objects normally, rather than bodging all of common/efi/ through arch/efi/ ? ~Andrew
