use _data_loadaddr instead of _etext
this change was done in master in [1] and just merged here. [1] 74cd991e7e8972cf22933743c847b5ce2b165798
This commit is contained in:
parent
36f95447a8
commit
b5de267b06
@ -57,6 +57,7 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_ebss = .;
|
_ebss = .;
|
||||||
} >ram AT >rom
|
} >ram AT >rom
|
||||||
|
_data_loadaddr = LOADADDR(.data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The .eh_frame section appears to be used for C++ exception handling.
|
* The .eh_frame section appears to be used for C++ exception handling.
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
#define WEAK __attribute__ ((weak))
|
#define WEAK __attribute__ ((weak))
|
||||||
|
|
||||||
/* Symbols exported by the linker script(s). */
|
/* Symbols exported by the linker script(s): */
|
||||||
extern unsigned _etext, _data, _edata, _ebss, _stack;
|
extern unsigned _data_loadaddr, _data, _edata, _ebss, _stack;
|
||||||
|
|
||||||
void main(void);
|
void main(void);
|
||||||
void blocking_handler(void);
|
void blocking_handler(void);
|
||||||
@ -109,7 +109,7 @@ void WEAK reset_handler(void)
|
|||||||
|
|
||||||
__asm__("MSR msp, %0" : : "r"(&_stack));
|
__asm__("MSR msp, %0" : : "r"(&_stack));
|
||||||
|
|
||||||
for (src = &_etext, dest = &_data; dest < &_edata; src++, dest++)
|
for (src = &_data_loadaddr, dest = &_data; dest < &_edata; src++, dest++)
|
||||||
*dest = *src;
|
*dest = *src;
|
||||||
|
|
||||||
while (dest < &_ebss)
|
while (dest < &_ebss)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user