Good day, I've noticed that the initialized data section in the program binary is zero bytes, by inspecting the file with 'size':
$ arm-none-eabi-size main.out text data bss dec hex filename 56160 0 2856 59016 e688 main.out
I'm running GCC 4.4.0, crosscompiled for ARM under Linux. I definately have the ".data" section in my linker script. The data section follows my (.text) section.
I've confirmed that I have some variables that are initialised inside my code where they are defined, i.e
---snip--- int main(void) { char myChar=5; ... }
Could somebody please give me some feedback on the way that GCC is handling initialized variables and if what I'm seeing is actually the correct behavior?
---snip--- .data 0x04000000 : AT (ADDR(.text) + SIZEOF(.text)) { . = ALIGN(4); datastart = .; __data_start__ = . ; *(.data) . = ALIGN(4); __data_end__ = . ; edata = .; _edata = .; }
---snip---
Regards, Frikkie Thirion