[U-Boot] [PATCH v2 5/8] eabi_compat: add __aeabi_memcpy __aeabi_memset

Jeroen Hofstee jeroen at myspectrum.nl
Wed Jul 30 21:54:53 CEST 2014


cc: Albert ARIBAUD <albert.u.boot at aribaud.net>
Signed-off-by: Jeroen Hofstee <jeroen at myspectrum.nl>
---
fixes this:

common/libcommon.o: In function `env_callback_init':
/home/jeroen/software/u-boot/common/env_callback.c:47: undefined reference to `__aeabi_memset'
common/libcommon.o: In function `parse_stream_outer':
/home/jeroen/software/u-boot/common/hush.c:3154: undefined reference to `__aeabi_memset'
disk/libdisk.o: In function `get_device_and_partition':
/home/jeroen/software/u-boot/disk/part.c:596: undefined reference to `__aeabi_memcpy'
/home/jeroen/software/u-boot/disk/part.c:605: undefined reference to `__aeabi_memcpy'
fs/fat/libfat.o: In function `fat_set_blk_dev':
/home/jeroen/software/u-boot/fs/fat/fat.c:60: undefined reference to `__aeabi_memcpy'
fs/ubifs/libubifs.o: In function `ubifs_tnc_locate':
/home/jeroen/software/u-boot/fs/ubifs/tnc.c:1457: undefined reference to `__aeabi_memcpy'
fs/ubifs/libubifs.o: In function `tnc_insert':
/home/jeroen/software/u-boot/fs/ubifs/tnc.c:2008: undefined reference to `__aeabi_memcpy'
fs/ubifs/libubifs.o:/home/jeroen/software/u-boot/fs/ubifs/tnc.c:2333: more undefined references to `__aeabi_memcpy' follow
arm-linux-gnueabi-ld.bfd: BFD (GNU Binutils for Ubuntu) 2.23.2 assertion fail ../../bfd/elf32-arm.c:7683
arm-linux-gnueabi-ld.bfd: BFD (GNU Binutils for Ubuntu) 2.23.2 assertion fail ../../bfd/elf32-arm.c:7683
arm-linux-gnueabi-ld.bfd: error: required section '.rel.plt' not found in the linker script
arm-linux-gnueabi-ld.bfd: final link failed: Invalid operation
---
 arch/arm/lib/eabi_compat.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
index 10d1933..a2cb06e 100644
--- a/arch/arm/lib/eabi_compat.c
+++ b/arch/arm/lib/eabi_compat.c
@@ -20,8 +20,19 @@ int raise (int signum)
 /* Dummy function to avoid linker complaints */
 void __aeabi_unwind_cpp_pr0(void)
 {
-};
+}
 
 void __aeabi_unwind_cpp_pr1(void)
 {
-};
+}
+
+/* Copy memory like memcpy, but no return value required.  */
+void __aeabi_memcpy(void *dest, const void *src, size_t n)
+{
+	(void) memcpy(dest, src, n);
+}
+
+void __aeabi_memset(void *dest, size_t n, int c)
+{
+	(void) memset(dest, c, n);
+}
-- 
1.9.1



More information about the U-Boot mailing list