efi_loader: remove comparisons to string literals from runtime
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Fri, 14 Feb 2025 13:46:45 +0000 (15:46 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 20 Feb 2025 08:22:53 +0000 (09:22 +0100)
commit530e869ff89d9575103637af201fe97864d4f577
treea7223c97c2e9ca2f33d01c5311301179c6aabd19
parent80908fee7705cd2edb2df94c3d124c44dd515582
efi_loader: remove comparisons to string literals from runtime

For EFI runtime services, we manage to preserve string literals
by placing the .efi_runtime section just before .data and preserving
it when marking the runtime memory by marking surrounding boottime
code as runtime. This is ok for now but will break if we update any
linker scripts and decouple .text and .runtime sections.

So let's define the strings we used to compare in the appropriate
section for runtime services

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
lib/efi_loader/efi_var_mem.c
lib/efi_loader/efi_variable_tee.c