[Concept,12/18] ulib: efi: Disable relocation or runtime-services

Message ID 20250904130459.848794-13-sjg@u-boot.org
State New
Headers
Series ulib: Introduce building U-Boot as a shared library |

Commit Message

Simon Glass Sept. 4, 2025, 1:04 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

This cannot work with the shared library at present, since the symbols
are not defined. Disable it for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 lib/efi_loader/efi_runtime.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 58c3ea1870f..2bd2582ede5 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -717,6 +717,10 @@  static __efi_runtime void efi_relocate_runtime_table(ulong offset)
 /* Relocate EFI runtime to uboot_reloc_base = offset */
 void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map)
 {
+	/* Skip EFI runtime relocation when building as a library */
+	if (IS_ENABLED(CONFIG_ULIB))
+		return;
+
 #ifdef IS_RELA
 	struct elf_rela *rel = (void *)__efi_runtime_rel_start;
 #else