From f250c337f1a5ab648709c899d14fcf086f5c3aff Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Wed, 22 Jul 2015 20:40:13 +0200 Subject: [PATCH] ARM: provide __aeabi_memclr* and __aeabi_memcpy* symbols Fixes compilation with recent clang. --- grub-core/kern/compiler-rt.c | 15 +++++++++++++++ include/grub/compiler-rt.h | 7 +++++++ 2 files changed, 22 insertions(+) diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c index d4cc15513..5cfcb3907 100644 --- a/grub-core/kern/compiler-rt.c +++ b/grub-core/kern/compiler-rt.c @@ -381,9 +381,24 @@ __aeabi_idiv (grub_int32_t a, grub_int32_t b) __attribute__ ((alias ("__divsi3"))); void *__aeabi_memcpy (void *dest, const void *src, grub_size_t n) __attribute__ ((alias ("grub_memcpy"))); +void *__aeabi_memcpy4 (void *dest, const void *src, grub_size_t n) + __attribute__ ((alias ("grub_memcpy"))); +void *__aeabi_memcpy8 (void *dest, const void *src, grub_size_t n) + __attribute__ ((alias ("grub_memcpy"))); void *__aeabi_memset (void *s, int c, grub_size_t n) __attribute__ ((alias ("memset"))); +void +__aeabi_memclr (void *s, grub_size_t n) +{ + grub_memset (s, 0, n); +} + +void __aeabi_memclr4 (void *s, grub_size_t n) + __attribute__ ((alias ("__aeabi_memclr"))); +void __aeabi_memclr8 (void *s, grub_size_t n) + __attribute__ ((alias ("__aeabi_memclr"))); + int __aeabi_ulcmp (grub_uint64_t a, grub_uint64_t b) { diff --git a/include/grub/compiler-rt.h b/include/grub/compiler-rt.h index 9265c7e80..dc73649a5 100644 --- a/include/grub/compiler-rt.h +++ b/include/grub/compiler-rt.h @@ -88,7 +88,14 @@ EXPORT_FUNC (__aeabi_lmul) (grub_uint64_t a, grub_uint64_t b); void * EXPORT_FUNC (__aeabi_memcpy) (void *dest, const void *src, grub_size_t n); void * +EXPORT_FUNC (__aeabi_memcpy4) (void *dest, const void *src, grub_size_t n); +void * +EXPORT_FUNC (__aeabi_memcpy8) (void *dest, const void *src, grub_size_t n); +void * EXPORT_FUNC(__aeabi_memset) (void *s, int c, grub_size_t n); +void EXPORT_FUNC(__aeabi_memclr) (void *s, grub_size_t n); +void EXPORT_FUNC(__aeabi_memclr4) (void *s, grub_size_t n); +void EXPORT_FUNC(__aeabi_memclr8) (void *s, grub_size_t n); grub_uint64_t EXPORT_FUNC (__aeabi_lasr) (grub_uint64_t u, int b);