diff options
author | Tom Rini <trini@konsulko.com> | 2025-04-02 14:34:08 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-02 14:34:08 -0600 |
commit | 8b0fe584ae91b588227d69eb7572f72d8b86a83c (patch) | |
tree | f2af05046eddfcec18790346e3131596ee88d343 /arch/arm/lib | |
parent | d6cc404b5f8d95b8c84537eac097eb5bcca08d78 (diff) | |
parent | 358d1cc232c30091767ce192e74169e7861ae58a (diff) |
Merge patch series "Various toolchain compatibility fixes/improvements"
Sam Edwards <cfsworks@gmail.com> says:
This is v2 of my "misc. fixes" series, sent to prepare the codebase for more
direct LLVM support in the near future. This series contains several fixes that
I found in the process of preparing that support and which address issues
independent of any future feature or enhancement. I am sending these now, both
so that their inclusion is not delayed by discussion on my upcoming series and
to make the latter more manageable.
Link: https://lore.kernel.org/r/20250315221813.1265193-1-CFSworks@gmail.com
Diffstat (limited to 'arch/arm/lib')
-rw-r--r-- | arch/arm/lib/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/lib/crt0_arm_efi.S | 3 | ||||
-rw-r--r-- | arch/arm/lib/eabi_compat.c | 17 |
3 files changed, 20 insertions, 1 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_arm_efi.S b/arch/arm/lib/crt0_arm_efi.S index 1e7de5c3343..593ee1e194a 100644 --- a/arch/arm/lib/crt0_arm_efi.S +++ b/arch/arm/lib/crt0_arm_efi.S @@ -150,7 +150,8 @@ _start: 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); |