diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2021-11-17 12:49:18 +0900 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-11-17 08:42:37 +0100 |
commit | ba80c6eaec11bd522db970ba9c4849dcb349c994 (patch) | |
tree | a053da598f65060d76de2562ca84afd8f2c17524 | |
parent | cbe94d33fe10a069b66b2ce558db3b7acffe6e5a (diff) | |
download | barebox-ba80c6eaec11bd522db970ba9c4849dcb349c994.tar.gz barebox-ba80c6eaec11bd522db970ba9c4849dcb349c994.tar.xz |
x86_64: do not pass the EFI image handle or system table to relocation
The _reloc() function in reloc_x86_64.c is passed with the EFI image
handle and system table, but they are unrelated to the relocation.
In fact, they are not used at all.
Remove them and clean up the assembler code as well.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.barebox.org/20211117034918.1226358-6-masahiroy@kernel.org
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/x86/mach-efi/crt0-efi-x86_64.S | 6 | ||||
-rw-r--r-- | arch/x86/mach-efi/reloc_x86_64.c | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/arch/x86/mach-efi/crt0-efi-x86_64.S b/arch/x86/mach-efi/crt0-efi-x86_64.S index aa03106e9c..d23c1fb2d6 100644 --- a/arch/x86/mach-efi/crt0-efi-x86_64.S +++ b/arch/x86/mach-efi/crt0-efi-x86_64.S @@ -47,14 +47,10 @@ _start: lea image_base(%rip), %rdi lea _DYNAMIC(%rip), %rsi - popq %rcx - popq %rdx - pushq %rcx - pushq %rdx call _relocate - popq %rdi popq %rsi + popq %rdi call efi_main addq $8, %rsp diff --git a/arch/x86/mach-efi/reloc_x86_64.c b/arch/x86/mach-efi/reloc_x86_64.c index e83bacb302..f015ae047d 100644 --- a/arch/x86/mach-efi/reloc_x86_64.c +++ b/arch/x86/mach-efi/reloc_x86_64.c @@ -41,9 +41,9 @@ #include <elf.h> -asmlinkage efi_status_t _relocate (long, Elf64_Dyn *, efi_handle_t, efi_system_table_t *); +asmlinkage efi_status_t _relocate(long, Elf64_Dyn *); -efi_status_t _relocate (long ldbase, Elf64_Dyn *dyn, efi_handle_t image, efi_system_table_t *systab) +efi_status_t _relocate(long ldbase, Elf64_Dyn *dyn) { long relsz = 0, relent = 0; Elf64_Rel *rel = 0; |