Remove unused _relocate arguments
Subsystems (3)
v3 cover Remove unused _relocate arguments
EFI image handle and system table are not used in _relocate().
v3:
Rebased on u-boot/master
v2:
Separated the changes in efi_main() arguments and calling convention.
Ivan Gorinov (3):
x86: Remove unused _relocate arguments
arm: Remove unused _relocate arguments
riscv: Remove unused _relocate arguments
arch/arm/lib/crt0_aarch64_efi.S | 2 -- arch/arm/lib/crt0_arm_efi.S | 2 -- arch/arm/lib/reloc_aarch64_efi.c | 3 +-- arch/arm/lib/reloc_arm_efi.c | 3 +-- arch/riscv/lib/reloc_riscv_efi.c | 3 +-- arch/x86/lib/crt0_x86_64_efi.S | 3 --- arch/x86/lib/reloc_ia32_efi.c | 3 +-- arch/x86/lib/reloc_x86_64_efi.c | 3 +-- 8 files changed, 5 insertions(+), 17 deletions(-)
Signature · 1 line
2.7.4
PATCH v3 1/3 x86: Remove unused _relocate arguments
EFI image handle and system table are not used in _relocate().
--- arch/x86/lib/crt0_x86_64_efi.S | 3 --- arch/x86/lib/reloc_ia32_efi.c | 3 +-- arch/x86/lib/reloc_x86_64_efi.c | 3 +-- 3 files changed, 2 insertions(+), 7 deletions(-)
arch/x86/lib/crt0_x86_64_efi.S +0 -3
@@ -18,9 +18,6 @@ _start: pushq %rcx pushq %rdx - mov %rcx, %r8 - mov %rdx, %r9 - lea image_base(%rip), %rcx lea _DYNAMIC(%rip), %rdx
arch/x86/lib/reloc_ia32_efi.c +1 -2
@@ -12,8 +12,7 @@#include <elf.h> #include <asm/elf.h> -efi_status_t _relocate (long ldbase,Elf32_Dyn *dyn,efi_handle_t image, -struct efi_system_table *systab) +efi_status_t EFIAPI _relocate(long ldbase, Elf32_Dyn *dyn) {long relsz =0 , relent =0 ;Elf32_Rel *rel =0 ;
arch/x86/lib/reloc_x86_64_efi.c +1 -2
@@ -14,8 +14,7 @@#include <elf.h> #include <asm/elf.h> -efi_status_t _relocate (long ldbase,Elf64_Dyn *dyn,efi_handle_t image, -struct efi_system_table *systab) +efi_status_t EFIAPI _relocate(long ldbase, Elf64_Dyn *dyn) {long relsz =0 , relent =0 ;Elf64_Rel *rel =0 ;
Signature · 1 line
2.7.4
PATCH v3 2/3 arm: Remove unused _relocate arguments
In reply to Ivan GorinovEFI image handle and system table are not used in _relocate().
--- arch/arm/lib/crt0_aarch64_efi.S | 2 -- arch/arm/lib/crt0_arm_efi.S | 2 -- arch/arm/lib/reloc_aarch64_efi.c | 3 +-- arch/arm/lib/reloc_arm_efi.c | 3 +-- 4 files changed, 2 insertions(+), 8 deletions(-)
arch/arm/lib/crt0_aarch64_efi.S +0 -2
@@ -122,8 +122,6 @@ _start: mov x29, sp stp x0, x1, [sp, #16] - mov x2, x0 - mov x3, x1 adr x0, ImageBase adrp x1, _DYNAMIC add x1, x1, #:lo12:_DYNAMIC
arch/arm/lib/crt0_arm_efi.S +0 -2
@@ -119,8 +119,6 @@ section_table: _start: stmfd sp!, {r0-r2, lr} - mov r2, r0 - mov r3, r1 adr r1, .L_DYNAMIC ldr r0, [r1] add r1, r0, r1
arch/arm/lib/reloc_aarch64_efi.c +1 -2
@@ -38,8 +38,7 @@#include <elf.h> -efi_status_t _relocate (long ldbase,Elf64_Dyn *dyn,efi_handle_t image, -struct efi_system_table *systab) +efi_status_t _relocate (long ldbase,Elf64_Dyn *dyn) {long relsz =0 , relent =0 ;Elf64_Rela *rel =0 ;
arch/arm/lib/reloc_arm_efi.c +1 -2
@@ -14,8 +14,7 @@#include <efi.h> #include <elf.h> -efi_status_t _relocate (long ldbase,Elf32_Dyn *dyn,efi_handle_t image, -struct efi_system_table *systab) +efi_status_t _relocate (long ldbase,Elf32_Dyn *dyn) {long relsz =0 , relent =0 ;Elf32_Rel *rel =0 ;
Signature · 1 line
2.7.4
PATCH v3 3/3 riscv: Remove unused _relocate arguments
In reply to Ivan GorinovEFI image handle and system table are not used in _relocate().
--- arch/riscv/lib/reloc_riscv_efi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/riscv/lib/reloc_riscv_efi.c +1 -2
@@ -50,8 +50,7 @@#define ELF_R_TYPE ELF32_R_TYPE#endif -efi_status_t _relocate (long ldbase,Elf_Dyn *dyn,efi_handle_t image, -struct efi_system_table *systab) +efi_status_t _relocate (long ldbase,Elf_Dyn *dyn) {long relsz =0 , relent =0 ;Elf_Rela *rel =0 ;
Signature · 1 line
2.7.4
v3 cover Remove unused _relocate arguments
In reply to Ivan GorinovQuoted 2 lines · Ivan Gorinov
EFI image handle and system table are not used in
_relocate().
Quoted 22 lines
v3:
Rebased on u-boot/masterv2:
Separated the changes inefi_main()arguments and calling
convention.Ivan Gorinov (3):
x86: Remove unused_relocatearguments
arm: Remove unused_relocatearguments
riscv: Remove unused_relocateargumentsarch/arm/lib/crt0_aarch64_efi.S | 2 -- arch/arm/lib/crt0_arm_efi.S | 2 -- arch/arm/lib/reloc_aarch64_efi.c | 3 +-- arch/arm/lib/reloc_arm_efi.c | 3 +-- arch/riscv/lib/reloc_riscv_efi.c | 3 +-- arch/x86/lib/crt0_x86_64_efi.S | 3 --- arch/x86/lib/reloc_ia32_efi.c | 3 +-- arch/x86/lib/reloc_x86_64_efi.c | 3 +-- 8 files changed, 5 insertions(+), 17 deletions(-)
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
v3 cover Remove unused _relocate arguments
In reply to Ivan GorinovHi Ivan,
Quoted 10 lines · Ivan Gorinov
EFI image handle and system table are not used in
_relocate().v3:
Rebased on u-boot/masterv2:
Separated the changes inefi_main()arguments and calling convention.Ivan Gorinov (3):
x86: Remove unused_relocatearguments
I don't understand the v3 patch now.
In previous v1/v2 patch, you did not change x86's _relocate() to declare EFIAPI, but in v3, you suddenly added EFIAPI to the x86 version but without adding EFIAPI to arm and risv, why?
Quoted 13 lines
arm: Remove unused
_relocatearguments
riscv: Remove unused_relocateargumentsarch/arm/lib/crt0_aarch64_efi.S | 2 -- arch/arm/lib/crt0_arm_efi.S | 2 -- arch/arm/lib/reloc_aarch64_efi.c | 3 +-- arch/arm/lib/reloc_arm_efi.c | 3 +-- arch/riscv/lib/reloc_riscv_efi.c | 3 +-- arch/x86/lib/crt0_x86_64_efi.S | 3 --- arch/x86/lib/reloc_ia32_efi.c | 3 +-- arch/x86/lib/reloc_x86_64_efi.c | 3 +-- 8 files changed, 5 insertions(+), 17 deletions(-)
Regards,
Bin
v3 cover Remove unused _relocate arguments
Quoted 11 lines · Bin Meng
Hi Ivan,
Quoted 8 lines · Ivan Gorinov
EFI image handle and system table are not used in
_relocate().v3:
Rebased on u-boot/masterv2:
Separated the changes inefi_main()arguments and calling convention.
Quoted 8 lines
Quoted 2 lines
Ivan Gorinov (3):
x86: Remove unused_relocateargumentsI don't understand the v3 patch now.
In previous v1/v2 patch, you did not change x86's
_relocate()to declare EFIAPI, but in v3, you suddenly added EFIAPI to the x86 version but without adding EFIAPI to arm and risv, why?
Keeping default calling convention in v2 was a mistake because the x86_64 startup code passes _relocate() arguments using EFI convention.
I will submit another version that consistently uses EFIAPI in _relocate().
Quoted 17 lines
Quoted 4 lines
arm: Remove unused
_relocatearguments
riscv: Remove unused_relocateargumentsQuoted 10 lines
arch/arm/lib/crt0_aarch64_efi.S | 2 -- arch/arm/lib/crt0_arm_efi.S | 2 -- arch/arm/lib/reloc_aarch64_efi.c | 3 +-- arch/arm/lib/reloc_arm_efi.c | 3 +-- arch/riscv/lib/reloc_riscv_efi.c | 3 +-- arch/x86/lib/crt0_x86_64_efi.S | 3 --- arch/x86/lib/reloc_ia32_efi.c | 3 +-- arch/x86/lib/reloc_x86_64_efi.c | 3 +-- 8 files changed, 5 insertions(+), 17 deletions(-)Regards,
Bin