diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2013-09-29 15:19:34 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2013-09-29 15:19:34 +0000 |
commit | ca496244103b0a2a1a4d396c843bea40a59057d0 (patch) | |
tree | 1f80d6e09e6058325835fee05bc3935f6376bfd2 | |
parent | 278bc67bbc42e4613c4d6fb24cb316c21c6a91e2 (diff) | |
download | src-ca496244103b0a2a1a4d396c843bea40a59057d0.tar.gz src-ca496244103b0a2a1a4d396c843bea40a59057d0.zip |
Fix ixp425 boot2 with ARM EABI:
- libkern is missing __aeabi_llsl, implement this by calling __ashldi3.
- Because of how the asm entry macros are defined the boot2 code
requires the unwind symbols to exist, include them in boot2.
Approved by: re (marius)
Notes
Notes:
svn path=/head/; revision=255939
-rw-r--r-- | sys/boot/arm/ixp425/boot2/Makefile | 5 | ||||
-rw-r--r-- | sys/libkern/arm/aeabi_unwind.c | 4 | ||||
-rw-r--r-- | sys/libkern/ashldi3.c | 10 |
3 files changed, 19 insertions, 0 deletions
diff --git a/sys/boot/arm/ixp425/boot2/Makefile b/sys/boot/arm/ixp425/boot2/Makefile index 07b8be71879b..9a96d3bc4567 100644 --- a/sys/boot/arm/ixp425/boot2/Makefile +++ b/sys/boot/arm/ixp425/boot2/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + # We get a lot of the std lib functions from here. .PATH: ${.CURDIR}/../../at91/libat91 @@ -15,6 +17,9 @@ FILES=${P} SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:tl}_board.c SRCS+=memchr.c memcmp.c memcpy.c memmem.c memset.c printf.c strcmp.c strcpy.c SRCS+=strlen.c ashldi3.c divsi3.S muldi3.c +.if ${MK_ARM_EABI} != "no" +SRCS+=aeabi_unwind.c +.endif NO_MAN= KERNPHYSADDR=0x180000 diff --git a/sys/libkern/arm/aeabi_unwind.c b/sys/libkern/arm/aeabi_unwind.c index 098e6e68cbfd..efaf58d3d0b3 100644 --- a/sys/libkern/arm/aeabi_unwind.c +++ b/sys/libkern/arm/aeabi_unwind.c @@ -29,7 +29,11 @@ __FBSDID("$FreeBSD$"); #include <sys/types.h> +#ifdef _KERNEL #include <sys/systm.h> +#else +#define panic(x) (void)0 +#endif #ifdef __ARM_EABI__ /* We need to provide these functions never call them */ diff --git a/sys/libkern/ashldi3.c b/sys/libkern/ashldi3.c index 435a35af79d8..4ad69745c21a 100644 --- a/sys/libkern/ashldi3.c +++ b/sys/libkern/ashldi3.c @@ -59,3 +59,13 @@ __ashldi3(a, shift) } return (aa.q); } + +#ifdef __ARM_EABI__ +long long __aeabi_llsl(long long, int); + +long long +__aeabi_llsl(long long a, int b) +{ + return __ashldi3(a, b); +} +#endif |