aboutsummaryrefslogtreecommitdiff
path: root/linker/linker_script.ld
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2021-10-26 00:38:58 -0600
committerJosh Rahm <joshuarahm@gmail.com>2021-10-26 00:38:58 -0600
commit4507bff773fd4cc540c91c6c3696ac3cf9a21b3c (patch)
tree589fb2a21d77913254baaa38cf4528026b0a902b /linker/linker_script.ld
parentf9b12f748b557994b958115c04fd1591b322248e (diff)
downloadstm32l4-4507bff773fd4cc540c91c6c3696ac3cf9a21b3c.tar.gz
stm32l4-4507bff773fd4cc540c91c6c3696ac3cf9a21b3c.tar.bz2
stm32l4-4507bff773fd4cc540c91c6c3696ac3cf9a21b3c.zip
Removed the requirement for the init data to be aligned.
I don't yet know how to configure the the initscript to align the INIT_DATA_VALUES. Nothing seems to work. But whatever, it seems like things work and it's a very minor performance hit.
Diffstat (limited to 'linker/linker_script.ld')
-rw-r--r--linker/linker_script.ld4
1 files changed, 3 insertions, 1 deletions
diff --git a/linker/linker_script.ld b/linker/linker_script.ld
index 1817fbd..83dcca0 100644
--- a/linker/linker_script.ld
+++ b/linker/linker_script.ld
@@ -9,16 +9,18 @@ SECTIONS
{
/* This is where the code goes. */
. = ORIGIN(flash);
- .text : {
+ .text ALIGN(0x100) : {
*(.vectors); /* All .vector sections go here. */
*(.text); /* All .text sections go here. */
} >flash
.data : {
+ . = ALIGN(0x04);
/* Data segment as defined in the flash. */
INIT_DATA_VALUES = LOADADDR(.data);
/* Data segment where it will be in memory. */
+ . = ALIGN(0x04);
DATA_SEGMENT_START = .;
*(.data);
DATA_SEGMENT_STOP = .;