--- avr-libc-20020203-patchc++ Thu Mar 7 17:34:18 2002 +++ avr-libc-20020203-patchc++-fixed Thu Mar 7 17:36:30 2002 @@ -888,18 +888,18 @@ + .endfunc + + .section .init3, "ax", @progbits -+; Copy initalized data from __data_load_start to _data_start until _data_load_end -+ ldi ZL, lo8(_data_load_start) -+ ldi ZH, hi8(_data_load_start) ++; Copy initalized data from __data_load_start to __data_start until __data_load_end ++ ldi ZL, lo8(__data_load_start) ++ ldi ZH, hi8(__data_load_start) #if BIG_CODE - ldi r_tmp2, hh8(_etext) ; this will be in RAMPZ for "elpm" -+ ldi r_tmp2, hh8(_data_load_start) ; this will be in RAMPZ for "elpm" ++ ldi r_tmp2, hh8(__data_load_start) ; this will be in RAMPZ for "elpm" #endif ldi XL, lo8(__data_start) ; load start of ram ldi XH, hi8(__data_start) #if XRAMEND > 0x100 /* don't bother with high byte if we know it must be 0 */ - ldi r_tmp1, hi8(_edata) -+ ldi r_tmp1, hi8(_data_end) ++ ldi r_tmp1, hi8(__data_end) #endif LPM_R0_ZPLUS_INIT r_tmp2 rjmp .copy_data_start @@ -908,10 +908,10 @@ st X+, r0 .copy_data_start: - cpi XL, lo8(_edata) -+ cpi XL, lo8(_data_end) ++ cpi XL, lo8(__data_end) #if XRAMEND > 0x100 - cpc XH, r_tmp1 ; hi8(_edata) -+ cpc XH, r_tmp1 ; hi8(_data_end) ++ cpc XH, r_tmp1 ; hi8(__data_end) #endif brne .copy_data_loop - ;; avr-ld always put .bss after .data