efi/libstub: move efi_system_table global var into separate object

To avoid pulling in the wrong object when using the libstub static
library to build the decompressor, define efi_system_table in a separate
compilation unit.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Ard Biesheuvel 2022-05-06 11:37:50 +02:00
parent c82ceb440b
commit 514377d8a7
3 changed files with 10 additions and 3 deletions

View file

@ -66,7 +66,8 @@ $(obj)/lib-%.o: $(srctree)/lib/%.c FORCE
$(call if_changed_rule,cc_o_c)
lib-$(CONFIG_EFI_GENERIC_STUB) += efi-stub.o fdt.o string.o intrinsics.o \
$(patsubst %.c,lib-%.o,$(efi-deps-y))
$(patsubst %.c,lib-%.o,$(efi-deps-y)) \
systable.o
lib-$(CONFIG_ARM) += arm32-stub.o
lib-$(CONFIG_ARM64) += arm64-stub.o

View file

@ -57,8 +57,6 @@
static u64 virtmap_base = EFI_RT_VIRTUAL_BASE;
static bool flat_va_mapping = (EFI_RT_VIRTUAL_OFFSET != 0);
const efi_system_table_t *efi_system_table;
static struct screen_info *setup_graphics(void)
{
efi_guid_t gop_proto = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;

View file

@ -0,0 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/efi.h>
#include <asm/efi.h>
#include "efistub.h"
const efi_system_table_t *efi_system_table;