Newlib RAM usage
Asked by
Chri
Hello,
I work with GNU ARM for C and C++. Newlib is used for standard library, is this true? To reduce RAM and Flash usage, I added
--specs=nano.specs
and to reduce unused things
-Wl,--gc-section
to my linker options. Still the lib uses about 1kb RAM, if I do not even use it. This is quite much for embedded systems.
Creating a map file, I could see what data uses the space. It is .data.impure_data with 0x428 = 1064 bytes. Can this be reduced?
I just noticed, adding -nostartfiles to linker options removes this data. My startup file calls __libc_init_array() if C++ is enabled. Is it safe, to call this function and add -nostartfiles?
Anyway, why does this impure data require 1kB and what is it used for?
Thanks in advance!
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- chengbin
- Solved:
- Last query:
- Last reply:
To post a message you must log in.