Home » Extra libraries, Code snippets, applications etc. » OS Problems etc., Win32, POSIX, MacOS, FreeBSD, X11 etc » GCC code size optimizations on ARM - GNU/Linux - uClibC
Re: GCC code size optimizations on ARM - GNU/Linux - uClibC [message #16518 is a reply to message #16511] |
Fri, 20 June 2008 09:29   |
chickenk
Messages: 171 Registered: May 2007 Location: Grenoble, France
|
Experienced Member |
|
|
Hello,
a few updates:
1. I was totally wrong about the -fdata-sections option. In fact my linker option --gc-sections was not correctly set at first, and then I corrected it. I don't remember when I did the correction, but I made new compilations and in fact the big size reduction is due to -ffunction-sections, not -fdata-sections.
As an aside note, my linker option was wrong because I had to write "-Wl,--gc-sections" instead of just "--gc-sections". Wouldn't it be better to prepend automatically the -Wl and -Xlinker arguments to the linker options?
2. I compiled the Core06 example in various ways, with and without garbage-collecting sections, -Os/-O2, with and without -ffunction-sections, etc.
The only executable that runs correctly is the one with debug information. All Optimal/Size/Speed configurations have failed to run, most often with an unauthorized memory access exception and a segfault. When I have more time, I will analyse the strace logs more, but right now I've not found why this happens, and where exactly.
However, one thing to mention : my target has quite limited resources: 64MB RAM and around 60MB of free Flash space. The storage space is a Nand Flash and the filesystem type is jffs2. There is no RTC so the date starts at 01-01-1970 at each reset.
I will try to investigate more, just wanted to give some (not so good) news.
regards,
Lionel
|
|
|
Goto Forum:
Current Time: Fri Jul 18 03:47:17 CEST 2025
Total time taken to generate the page: 0.03860 seconds
|