--- newlib-2.1.0/libgloss/arm/crt0.S.orig 2013-10-14 17:15:12.000000000 +0200 +++ newlib-2.1.0/libgloss/arm/crt0.S 2014-07-14 16:03:31.997315300 +0200 @@ -260,8 +260,15 @@ .thumb_func __change_mode: #endif - bl FUNCTION (memset) + + /* Initialize .data section. */ + ldr a1, .LC3 /* First arg: start of .data section */ + ldr a2, .LC3+4 /* Second arg: start of initializers in ROM */ + ldr a3, .LC3+8 /* Third arg: length of .data section. */ + subs a3, a3, a1 + bl FUNCTION (memcpy) + #if !defined (ARM_RDP_MONITOR) && !defined (ARM_RDI_MONITOR) /* Changes by toralf: Taken from libgloss/m68k/crt0.S * initialize target specific stuff. Only execute these @@ -485,6 +492,11 @@ .word __bss_start__ .LC2: .word __bss_end__ +.LC3: + .word __data_start__ + .word __data_load__ + .word __data_end__ + #ifdef __USES_INITFINI__ #ifdef _LITE_EXIT .Latexit: