[U-Boot] [PATCH v4 2/4] arm: Remove unused _relocate arguments

Bin Meng bmeng.cn at gmail.com
Wed Jun 13 01:38:00 UTC 2018


Hi Ivan,

On Wed, Jun 13, 2018 at 1:52 AM, Ivan Gorinov <ivan.gorinov at intel.com> wrote:
> EFI image handle and system table are not used in _relocate().
>
> Signed-off-by: Ivan Gorinov <ivan.gorinov at intel.com>
> ---
>  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(-)
>
> diff --git a/arch/arm/lib/crt0_aarch64_efi.S b/arch/arm/lib/crt0_aarch64_efi.S
> index 5b6c384..0db4360 100644
> --- a/arch/arm/lib/crt0_aarch64_efi.S
> +++ b/arch/arm/lib/crt0_aarch64_efi.S
> @@ -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
> diff --git a/arch/arm/lib/crt0_arm_efi.S b/arch/arm/lib/crt0_arm_efi.S
> index 0f296f3..23db49f 100644
> --- a/arch/arm/lib/crt0_arm_efi.S
> +++ b/arch/arm/lib/crt0_arm_efi.S
> @@ -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
> diff --git a/arch/arm/lib/reloc_aarch64_efi.c b/arch/arm/lib/reloc_aarch64_efi.c
> index 38c13d3..c648fe4 100644
> --- a/arch/arm/lib/reloc_aarch64_efi.c
> +++ b/arch/arm/lib/reloc_aarch64_efi.c
> @@ -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, efi_handle_t image)

This still has the image argument.

>  {
>         long relsz = 0, relent = 0;
>         Elf64_Rela *rel = 0;
> diff --git a/arch/arm/lib/reloc_arm_efi.c b/arch/arm/lib/reloc_arm_efi.c
> index 6232e3f..336a98a 100644
> --- a/arch/arm/lib/reloc_arm_efi.c
> +++ b/arch/arm/lib/reloc_arm_efi.c
> @@ -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;
> --

Regards,
Bin


More information about the U-Boot mailing list