Andes Workshop http://forum.andestech.com/ |
|
如何減少code size http://forum.andestech.com/viewtopic.php?f=6&t=820 |
Page 1 of 1 |
Author: | banyh [ Mon Apr 07, 2014 9:05 pm ] | |||
Post subject: | 如何減少code size | |||
在map.txt中,看到很多沒有用過的library function,而且比主程式大很多。 是否有辦法移除這些function? 例如 0x00001fdc __gxx_personality_v0 0x00006388 __cxa_demangle 0x00006354 __gcclibcxx_demangle_callback 0x000069e0 _Unwind_GetIPInfo 0x000069d8 _Unwind_GetIP 0x00009694 _Unwind_Find_FDE 0x00009430 __register_frame 0x0000a07c __sfvwrite_r 0x0000b738 _svfprintf_r 0x0000d658 _dtoa_r
|
Author: | cindy [ Tue Apr 08, 2014 7:30 pm ] |
Post subject: | Re: 如何減少code size |
您好, 我們研究一下。 |
Author: | jerry [ Wed Apr 09, 2014 11:31 am ] |
Post subject: | Re: 如何減少code size |
Hi banyh, The gcc compiler is auto produce __cxa_allocate_exception... etc. The reason it "works" by defining it as a global NULL void pointer is probably because nothing is throwing an exception. When something tries to throw an exception, then you will see it misbehave. you can reference the link: http://stackoverflow.com/questions/329059/what-is-gxx-personality-v0-for Attachment: solution: you can add the "-fno-exceptions" at Andes C++ Compiler->Miscellaneous Attachment:
|
Author: | banyh [ Wed Apr 09, 2014 4:12 pm ] |
Post subject: | Re: 如何減少code size |
謝謝,沒問題了 加上 -fno-exceptions -fno-rtti 就可以從77KB降到7KB |
Page 1 of 1 | All times are UTC + 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |