aboutsummaryrefslogtreecommitdiff
path: root/linker/linker_script.ld
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-12-08 14:01:09 -0700
committerJosh Rahm <joshuarahm@gmail.com>2022-12-08 14:01:09 -0700
commit12845efe524e2262e19fcb1e85697c4664e22b2f (patch)
treec5c9ef906cf25d1c2bfe0fb61832111e61784b4c /linker/linker_script.ld
parente9a6c87abab80e83c690b4f695cf4fef27c78702 (diff)
downloadstm32l4-12845efe524e2262e19fcb1e85697c4664e22b2f.tar.gz
stm32l4-12845efe524e2262e19fcb1e85697c4664e22b2f.tar.bz2
stm32l4-12845efe524e2262e19fcb1e85697c4664e22b2f.zip
Add broken linker stuff to test on desktop.
Diffstat (limited to 'linker/linker_script.ld')
-rw-r--r--linker/linker_script.ld14
1 files changed, 10 insertions, 4 deletions
diff --git a/linker/linker_script.ld b/linker/linker_script.ld
index d6ce40b..bec8fb7 100644
--- a/linker/linker_script.ld
+++ b/linker/linker_script.ld
@@ -8,11 +8,15 @@ MEMORY
SECTIONS
{
/* This is where the code goes. */
+ WAT = ORIGIN(flash);
. = ORIGIN(flash);
- .text ALIGN(0x100) : {
+ TEXT_START = .;
+ .text ALIGN(0x04) : {
*(.vectors); /* All .vector sections go here. */
*(.text); /* All .text sections go here. */
} >flash
+ TEXT_STOP = .;
+ . = ALIGN(0x04);
.data : ALIGN(0x04) {
/* Data segment as defined in the flash. */
@@ -24,9 +28,11 @@ SECTIONS
*(.data);
DATA_SEGMENT_STOP = .;
- INIT_ROUTINES_FLASH_START =
- LOADADDR(.data) + (DATA_SEGMENT_STOP - DATA_SEGMENT_START);
-
+ /* INIT_ROUTINES_FLASH_START =
+ LOADADDR(.data) + (DATA_SEGMENT_STOP - DATA_SEGMENT_START);
+ */
+ . = ALIGN(0x1c);
+ INIT_ROUTINES_FLASH_START = .;
INITS_START = .;
*(.init0);
INIT_0_END = ABSOLUTE(INIT_ROUTINES_FLASH_START) + (. - INITS_START);