← Back to team overview

t-kernel-zh team mailing list archive

Re: [Open T-Kernel] GCC 除法库的支持

 

为了方便调试,现在把汇编文件里面的符号定义为 weak 符号:
----8<----------------------------------------------------------------
>From 79171f158733273325ce5a4ee2e94a10e0c2b5ac Mon Sep 17 00:00:00 2001
From: Du Huanpeng <u74147@xxxxxxxxx>
Date: Sat, 7 Jan 2017 17:10:17 +0800
Subject: [PATCH] libgcc: define div routins as weak

Signed-off-by: Du Huanpeng <u74147@xxxxxxxxx>
---
 tkernel_source/sysdepend/arm/lib/libgcc.S | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/tkernel_source/sysdepend/arm/lib/libgcc.S b/tkernel_source/sysdepend/arm/lib/libgcc.S
index f21133c..9b814ec 100644
--- a/tkernel_source/sysdepend/arm/lib/libgcc.S
+++ b/tkernel_source/sysdepend/arm/lib/libgcc.S
@@ -1,13 +1,13 @@
-.globl __aeabi_idiv
-.globl __aeabi_idivmod
-.globl __aeabi_uidiv
-.globl __aeabi_uidivmod
-.globl __divsi3
-.globl __modsi3
-.globl __udivsi3
-.globl __umodsi3
-.globl __aeabi_ldivmod
-.globl __aeabi_uldivmod
+.weak __aeabi_idiv
+.weak __aeabi_idivmod
+.weak __aeabi_uidiv
+.weak __aeabi_uidivmod
+.weak __divsi3
+.weak __modsi3
+.weak __udivsi3
+.weak __umodsi3
+.weak __aeabi_ldivmod
+.weak __aeabi_uldivmod
 
 __aeabi_idiv:
 __aeabi_idivmod:
@@ -20,4 +20,4 @@ __umodsi3:
 __aeabi_ldivmod:
 __aeabi_uldivmod:
 	bx	lr
-	.end
\ No newline at end of file
+	.end
-- 
2.7.4

----8<----------------------------------------------------------------
-- 
Copyright (c) 2017 duhuanpeng <u74147@xxxxxxxxx>



References