C code global variables
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
"C++ specific" essentially means "not normally applicable to other languages than C++", which is why added the remark.JamesM wrote:By specific I meant "applies to C++, not to C, which is what you appear to be writing in".
I like doing things my own crazy wayJamesM wrote:And surely you're not writing an OS in freebasic?
![Mr. Green :mrgreen:](./images/smilies/icon_mrgreen.gif)
yes, my propblem was only solved in apparence, since i have zeroed the vars for test from the main function, rewriting the linker script, they remain zeroed, so rewriting the linker script seems be the solving action, but was not.
Finally i've seen what really happen debbuging the asm code.
As you said, about gcc, even if the variables are initialized to 0, they are read from the end of code, that is uninitialized memory (bss section).
I will memset to 0 the entire area.
Thanks again
Finally i've seen what really happen debbuging the asm code.
As you said, about gcc, even if the variables are initialized to 0, they are read from the end of code, that is uninitialized memory (bss section).
I will memset to 0 the entire area.
Thanks again