aboutsummaryrefslogtreecommitdiff
path: root/lib/lm3s/libopencm3_lm3s.ld
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lm3s/libopencm3_lm3s.ld')
-rw-r--r--lib/lm3s/libopencm3_lm3s.ld14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/lm3s/libopencm3_lm3s.ld b/lib/lm3s/libopencm3_lm3s.ld
index c1453fe..00ede3d 100644
--- a/lib/lm3s/libopencm3_lm3s.ld
+++ b/lib/lm3s/libopencm3_lm3s.ld
@@ -24,31 +24,34 @@
/* Enforce emmition of the vector table. */
EXTERN (vector_table)
+/* Define the entry point of the output file. */
+ENTRY(reset_handler)
+
/* Define sections. */
SECTIONS
{
- . = ORIGIN(rom);
-
.text : {
*(.vectors) /* Vector table */
*(.text*) /* Program code */
+ . = ALIGN(4);
*(.rodata*) /* Read-only data */
+ . = ALIGN(4);
_etext = .;
} >rom
- . = ORIGIN(ram);
-
.data : {
_data = .;
*(.data*) /* Read-write initialized data */
+ . = ALIGN(4);
_edata = .;
} >ram AT >rom
.bss : {
*(.bss*) /* Read-write zero initialized data */
*(COMMON)
+ . = ALIGN(4);
_ebss = .;
- } >ram AT >rom
+ } >ram
/*
* The .eh_frame section appears to be used for C++ exception handling.
@@ -62,6 +65,7 @@ SECTIONS
*/
/DISCARD/ : { *(.ARM.exidx) }
+ . = ALIGN(4);
end = .;
}