We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,I've built a static library using arm-none-eabi-gcc and used the -fdata-sections, -ffunction-sections, and --gc-sections to reduce the library memory footprint.
I've used that library successfully within an application sample when building with arm-none-eabi-gcc, but when I try to build the same application with armcc (Keil), I'm getting lots of undefined symbols in the static library.
When I remove the --gc-sections and build using arg-none-eabi-gcc I can see the same undefined symbols as on Keil, I assume --gc-sections got rid of them. But if I add to Keil the --split_sections and --remove options, Keil is still complaining about the undefined symbols.
So three questions:
1- Why the same static libray can be linked with gcc ld and not with armlink?
2- Isn't --gc-sections supposed not to remove undefined symbols as in the ld manual?
3- If I resolve all the undefined symbols by adding the necessary files, will that have considerable impact on library size or will I have only simple references added?
--unresolved=foo means make all references to unresolved symbols refer to 'foo' instead, so you need foo to be defined; maybe use --unresolved=main
I think I've got all my answers. Thanks a bunch Scott!