Page 2 of 2
Posted: Thu Jul 12, 2007 12:34 am
by JamesM
Fair point about the zero-bss optimisation - I didn't realise that happened (was told otherwise by the person that helped me when I had a similar problem). And surely you're not writing an OS in freebasic? By specific I meant "applies to C++, not to C, which is what you appear to be writing in".
Posted: Thu Jul 12, 2007 9:30 am
by Combuster
JamesM wrote:By specific I meant "applies to C++, not to C, which is what you appear to be writing in".
"C++ specific" essentially means "not normally applicable to other languages than C++", which is why added the remark.
JamesM wrote:And surely you're not writing an OS in freebasic?
I like doing things my own crazy way
Posted: Fri Jul 13, 2007 8:13 am
by spectrum
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