wang jintong wrote:
> Hi, all :
>
> Thank you very much , I have got toolchain .
>
> Now, I have some problem.. Like this :
>
> target SharedLib: libc 
> (out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so)
> out/target/product/generic/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(abort.o):
>  
> In function `abort':
> /home/workspace/eclair/bionic/libc/unistd/abort.c:126: relocation 
> truncated to fit: R_ARM_THM_JUMP11 against symbol 
> `__libc_android_abort' defined in .glue_7 section in 
> /home/workspace/eclair/prebuilt/linux-x86/toolchain/armv4t-android-eabi-4.2.1/bin/../lib/gcc/armv4t-android-eabi/4.2.1/interwork/libgcc.a(_clz.o)
> collect2: ld returned 1 exit status
>
> Help me !  Thank you ..
>

>
> On Wed, Dec 16, 2009 at 8:39 PM, tommy tommy <hongjiuj...@gmail.com 
> <mailto:hongjiuj...@gmail.com>> wrote:
>
>     great job
>
>     2009/12/16 Michael Trimarchi <trimar...@gandalf.sssup.it
>     <mailto:trimar...@gandalf.sssup.it>>
>
>         http://gitorious.org/android-on-freerunner
>
>         Michael
>
>         --
>         unsubscribe: android-porting+unsubscr...@googlegroups.com
>         <mailto:android-porting%2bunsubscr...@googlegroups.com>
>         website: http://groups.google.com/group/android-porting
>
>
>
>
>     -- 
>     Achievement provides the only real pleasure in life!
>
>     -- 
>     unsubscribe: android-porting+unsubscr...@googlegroups.com
>     <mailto:android-porting%2bunsubscr...@googlegroups.com>
>     website: http://groups.google.com/group/android-porting
>
>
> -- 
> unsubscribe: android-porting+unsubscr...@googlegroups.com
> website: http://groups.google.com/group/android-porting 

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting
diff --git a/libc/unistd/abort.c b/libc/unistd/abort.c
index 3e3aab0..f323941 100644
--- a/libc/unistd/abort.c
+++ b/libc/unistd/abort.c
@@ -39,13 +39,8 @@
 #define debug_log(format, ...)  \
     __libc_android_log_print(ANDROID_LOG_DEBUG, "libc-abort", (format), ##__VA_ARGS__ )
 
-#ifdef __arm__
-void
-__libc_android_abort(void)
-#else
 void
 abort(void)
-#endif
 {
 	struct atexit *p = __atexit;
 	static int cleanup_called = 0;
@@ -102,29 +97,3 @@ abort(void)
 	(void)kill(getpid(), SIGABRT);
 	_exit(1);
 }
-
-#ifdef __arm__
-/*
- * abort() does not return, which gcc interprets to mean that it doesn't
- * need to preserve any of the callee-save registers.  Unfortunately this
- * includes the link register, so if LR is used there is no way to determine
- * which function called abort().
- *
- * We work around this by inserting a trivial stub that doesn't alter
- * any of the "interesting" registers and thus doesn't need to save them.
- * We can't just call __libc_android_abort from C because gcc uses "bl"
- * without first saving LR, so we use an asm statement.  This also has
- * the side-effect of replacing abort() with __libc_android_abort() in
- * the stack trace.
- *
- * Ideally __libc_android_abort would be static, but I haven't figured out
- * how to tell gcc to call a static function from an asm statement.
- */
-void
-abort(void)
-{
-    asm ("b __libc_android_abort");
-    _exit(1);       /* suppress gcc noreturn warnings */
-}
-#endif
-

Reply via email to