Skip to content

Commit d6c68f2

Browse files
committed
flash.ld: fix mis-aligned .data section
The end of the .data section in flash must be explicitly word-aligned, otherwise corruption can occur in a .data section that happens to contain non-word aligned data.
1 parent 0285190 commit d6c68f2

File tree

1 file changed

+1
-0
lines changed
  • variants/arduino_101/linker_scripts

1 file changed

+1
-0
lines changed

variants/arduino_101/linker_scripts/flash.ld

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ SECTIONS
113113
__data_ram_start = .;
114114
*(.data)
115115
*(".data.*")
116+
. = ALIGN(4);
116117
} > SRAM
117118

118119
__data_ram_end = .;

0 commit comments

Comments
 (0)