aboutsummaryrefslogtreecommitdiff
path: root/lib/lpc13xx/libopencm3_lpc13xx.ld
diff options
context:
space:
mode:
authorNicolas Schodet2012-09-03 19:41:36 +0200
committerNicolas Schodet2012-09-03 19:53:43 +0200
commit2a35377980a05b6eb7ed47e9979b0ff3849d749f (patch)
treed5ad7602ca54169deb5d0f2f0229697f5342f230 /lib/lpc13xx/libopencm3_lpc13xx.ld
parent11727f56c97fb3d007e0d08e59294b6791067bd1 (diff)
Clean up and make linker scripts more uniform
This includes: - fix some comments indent, - add entry point, - align exported symbols, - remove unneeded "." assignments.
Diffstat (limited to 'lib/lpc13xx/libopencm3_lpc13xx.ld')
-rw-r--r--lib/lpc13xx/libopencm3_lpc13xx.ld14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/lpc13xx/libopencm3_lpc13xx.ld b/lib/lpc13xx/libopencm3_lpc13xx.ld
index 5f1630f..a1892cd 100644
--- a/lib/lpc13xx/libopencm3_lpc13xx.ld
+++ b/lib/lpc13xx/libopencm3_lpc13xx.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 = .;
}