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>
16 lines
505 B
C
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));
|