Re: [RFC PATCH 4/4] efi: efistub: convert into static library

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

 



On Mon, 16 Jun, at 05:14:48PM, Ard Biesheuvel wrote:
> This patch changes both x86 and arm64 efistub implementations from #including
> shared .c files under drivers/firmware/efi to building the shared code as a
> static library.
> 
> The x86 code uses a stub built into the boot executable which uncompresses the
> kernel at boot time. In this case, the library is linked into the decompressor.
> 
> In the arm64 case, the stub is part of the kernel proper so the library is
> linked into the kernel proper as well.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>

Sorry for the delay in reviewing this.

Conceptually, this is a nice cleanup. Unfortunately, I'm seeing the
following build error,

drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `efi_printk':
efi-stub-helper.c:(.text+0x1): undefined reference to `__fentry__'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `efi_get_memory_map':
efi-stub-helper.c:(.text+0x7f): undefined reference to `__fentry__'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `efi_high_alloc':
efi-stub-helper.c:(.text+0x1ea): undefined reference to `__fentry__'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `efi_low_alloc':
efi-stub-helper.c:(.text+0x3dd): undefined reference to `__fentry__'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `efi_free':
efi-stub-helper.c:(.text+0x59f): undefined reference to `__fentry__'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o):efi-stub-helper.c:(.text+0x5ec): more undefined references to `__fentry__' follow
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o):(.data+0x260): undefined reference to `__gcov_merge_add'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `_GLOBAL__sub_I_65535_0_efi_printk':
efi-stub-helper.c:(.text.startup+0xc): undefined reference to `__gcov_init'
make[3]: *** [arch/x86/boot/compressed/vmlinux] Error 1
make[2]: *** [arch/x86/boot/compressed/vmlinux] Error 2
make[1]: *** [bzImage] Error 2

This is because we use different CFLAGS for the EFI boot stub on x86.
Take a look at arch/x86/boot/compressed/Makefile to see what I mean.

What I'd suggest is that you simply update the efi-stub-helper.c
#include path in the x86 EFI boot stub in this series, and only roll out
the awesome new libstub for arm64. I'll take care of doing the necessary
CFLAG munging for x86 when I have some spare time. Could you do a v2?

That is, unless you really want to make it work for x86 ;-)

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux