diff options
Diffstat (limited to 'arch/arm/lib')
-rw-r--r-- | arch/arm/lib/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/lib/crt0_aarch64_efi.S | 1 | ||||
-rw-r--r-- | arch/arm/lib/crt0_arm_efi.S | 4 | ||||
-rw-r--r-- | arch/arm/lib/eabi_compat.c | 17 | ||||
-rw-r--r-- | arch/arm/lib/image.c | 9 |
5 files changed, 23 insertions, 9 deletions
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 1c95dd6fed2..74cd5051552 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -92,6 +92,7 @@ obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o # For EABI conformant tool chains, provide eabi_compat() ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) extra-y += eabi_compat.o +CFLAGS_REMOVE_eabi_compat.o := $(LTO_CFLAGS) endif # some files can only build in ARM or THUMB2, not THUMB1 diff --git a/arch/arm/lib/crt0_aarch64_efi.S b/arch/arm/lib/crt0_aarch64_efi.S index e21b54fdbcb..003d5f83041 100644 --- a/arch/arm/lib/crt0_aarch64_efi.S +++ b/arch/arm/lib/crt0_aarch64_efi.S @@ -144,6 +144,7 @@ section_table: IMAGE_SCN_CNT_INITIALIZED_DATA) .align 12 + .globl _start _start: stp x29, x30, [sp, #-32]! mov x29, sp diff --git a/arch/arm/lib/crt0_arm_efi.S b/arch/arm/lib/crt0_arm_efi.S index 91b0fe12c51..593ee1e194a 100644 --- a/arch/arm/lib/crt0_arm_efi.S +++ b/arch/arm/lib/crt0_arm_efi.S @@ -143,13 +143,15 @@ section_table: IMAGE_SCN_CNT_INITIALIZED_DATA) .align 12 + .globl _start _start: stmfd sp!, {r0-r2, lr} adr r1, .L_DYNAMIC ldr r0, [r1] add r1, r0, r1 - adrl r0, image_base + sub r0, pc, #((.+8-image_base) & 0xff) + sub r0, r0, #((.+4-image_base) & 0xff00) bl _relocate teq r0, #0 bne 0f diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c index 602efe04c04..e6cafcc5f2b 100644 --- a/arch/arm/lib/eabi_compat.c +++ b/arch/arm/lib/eabi_compat.c @@ -33,7 +33,24 @@ void __aeabi_memcpy(void *dest, const void *src, size_t n) (void) memcpy(dest, src, n); } +void __aeabi_memcpy4(void *dest, const void *src, size_t n) __alias(__aeabi_memcpy); + +void __aeabi_memcpy8(void *dest, const void *src, size_t n) __alias(__aeabi_memcpy); + void __aeabi_memset(void *dest, size_t n, int c) { (void) memset(dest, c, n); } + +void __aeabi_memset4(void *dest, size_t n, int c) __alias(__aeabi_memset); + +void __aeabi_memset8(void *dest, size_t n, int c) __alias(__aeabi_memset); + +void __aeabi_memclr(void *dest, size_t n) +{ + (void) memset(dest, 0, n); +} + +void __aeabi_memclr4(void *dest, size_t n) __alias(__aeabi_memclr); + +void __aeabi_memclr8(void *dest, size_t n) __alias(__aeabi_memclr); diff --git a/arch/arm/lib/image.c b/arch/arm/lib/image.c index d78d704cb58..1f672eee2c8 100644 --- a/arch/arm/lib/image.c +++ b/arch/arm/lib/image.c @@ -28,13 +28,6 @@ struct Image_header { uint32_t res5; }; -bool booti_is_valid(const void *img) -{ - const struct Image_header *ih = img; - - return ih->magic == le32_to_cpu(LINUX_ARM64_IMAGE_MAGIC); -} - int booti_setup(ulong image, ulong *relocated_addr, ulong *size, bool force_reloc) { @@ -46,7 +39,7 @@ int booti_setup(ulong image, ulong *relocated_addr, ulong *size, ih = (struct Image_header *)map_sysmem(image, 0); - if (!booti_is_valid(ih)) { + if (ih->magic != le32_to_cpu(LINUX_ARM64_IMAGE_MAGIC)) { puts("Bad Linux ARM64 Image magic!\n"); return 1; } |