0d260f61a0
Some toolchains, like Sourcery CodeBench Lite 2013.05-23 arm-none-eabi (http://sourcery.mentor.com/public/gnu_toolchain/arm-none-eabi/) automatically force the alignment of an output section LMA to use the maximum alignment of all its input sections. This toolchain uses GNU binutils 2.23, and this automatic behavior is the same as the manual behavior of the ALIGN_WITH_INPUT feature of GNU binutils 2.24+. This behavior is not an issue per se, but it creates a gap between _etext and the LMA of the .data output section if _etext does not have the same alignment, while reset_handler() initialized this section by copying the data from _etext to its VMA, hence an offset in the addresses of loaded data, and missing data. This commit fixes this issue by making reset_handler() directly use the LMA of the .data section using LOADADDR(.data), rather than assuming that _etext is this LMA. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com> |
||
---|---|---|
.. | ||
6502 | ||
arm | ||
avr | ||
cc26xx | ||
cc253x | ||
cc2430 | ||
cc2538 | ||
mc1322x | ||
msp430 | ||
native | ||
pic32 | ||
rl78 | ||
stm32w108 | ||
x86 |