frame_dummy() in crtstuff.c
I'm using GNU gcc for ARM architectures in one of my project. More specifically, I'm using Atmel ARM toolchain that is automatically installed with Atmel Studio 6.2 IDE. This toolchain is the GNU toolchain for ARM.
The example projects from Atmel are linked without -nostartfiles and I noticed frame_dummy() function is automatically linked in the final executable and it is really called from __libc_init_array() as one function in .init_array section.
I'm not an expert so I'm not able to understand the goal of frame_dummy() (I tried to read the source code in crtstuff.c, but I didn't understand anything...). So my question is: is frame_dummy() (and other functions in crtstuff.c) needed only in C++ projects? Could I exclude it from linking in purely C projects.
I'm interested in using the -nostartfiles option that doesn't include frame_dummy().
I think it's safe, because crtstuff.c says at the very beginning:
/* Specialized bits of code needed to support construction and
destruction of file-scope objects in C++ code. */
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Pozz Pozz for more information if necessary.