Files
u-boot/lib/efi_loader/efi_runtime_stubs.c
Simon Glass ef9b8d95c1 efi: Adjust condition for runtime relocation
Even if CONFIG_ULIB is enabled it may not actually be in use. If not,
we still need the EFI-runtime relocation to happen. Adjust the condition
in efi_runtime_relocate() to fix this.

For static linking with ulib examples, provide weak symbol definitions
for __efi_runtime_rel_start and __efi_runtime_rel_stop. These symbols
are normally defined in linker scripts but need fallback definitions
when linking statically against libu-boot.a.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-11-12 08:39:49 -07:00

16 lines
505 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* EFI runtime symbols stubs for static linking
*
* Copyright 2025 Canonical Ltd.
* Written by Simon Glass <simon.glass@canonical.com>
*/
/*
* Provide weak symbols for EFI runtime relocation markers.
* These are normally defined in linker scripts, but for static linking
* (e.g., ulib examples) we need weak definitions that can be overridden.
*/
char __efi_runtime_rel_start[0] __attribute__((weak));
char __efi_runtime_rel_stop[0] __attribute__((weak));