diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2020-02-17 12:44:37 +0100 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2020-02-22 23:37:37 +0100 |
commit | 9f9223778ef385e79dc67f5ee48ee4c1fb757f6b (patch) | |
tree | 82aab113bd4467d603dc317435832205ac1e7c74 /arch/arm64/kernel/image-vars.h | |
parent | e951a1f427f2312e17b4e0f485e60068ca1423bb (diff) | |
download | linux-9f9223778ef385e79dc67f5ee48ee4c1fb757f6b.tar.gz linux-9f9223778ef385e79dc67f5ee48ee4c1fb757f6b.tar.bz2 linux-9f9223778ef385e79dc67f5ee48ee4c1fb757f6b.zip |
efi/libstub/arm: Make efi_entry() an ordinary PE/COFF entrypoint
Expose efi_entry() as the PE/COFF entrypoint directly, instead of
jumping into a wrapper that fiddles with stack buffers and other
stuff that the compiler is much better at. The only reason this
code exists is to obtain a pointer to the base of the image, but
we can get the same value from the loaded_image protocol, which
we already need for other reasons anyway.
Update the return type as well, to make it consistent with what
is required for a PE/COFF executable entrypoint.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/image-vars.h')
-rw-r--r-- | arch/arm64/kernel/image-vars.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h index 25a2a9b479c2..87cb3d45b4bd 100644 --- a/arch/arm64/kernel/image-vars.h +++ b/arch/arm64/kernel/image-vars.h @@ -12,7 +12,8 @@ #ifdef CONFIG_EFI -__efistub_stext_offset = stext - _text; +__efistub_kernel_size = _edata - _text; + /* * The EFI stub has its own symbol namespace prefixed by __efistub_, to @@ -42,6 +43,7 @@ __efistub___memset = __pi_memset; #endif __efistub__text = _text; +__efistub_stext = stext; __efistub__end = _end; __efistub__edata = _edata; __efistub_screen_info = screen_info; |