From 2a35377980a05b6eb7ed47e9979b0ff3849d749f Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 3 Sep 2012 19:41:36 +0200 Subject: Clean up and make linker scripts more uniform This includes: - fix some comments indent, - add entry point, - align exported symbols, - remove unneeded "." assignments. --- lib/lpc17xx/libopencm3_lpc17xx.ld | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/lpc17xx') diff --git a/lib/lpc17xx/libopencm3_lpc17xx.ld b/lib/lpc17xx/libopencm3_lpc17xx.ld index 30a2c0f..a1892cd 100644 --- a/lib/lpc17xx/libopencm3_lpc17xx.ld +++ b/lib/lpc17xx/libopencm3_lpc17xx.ld @@ -1,4 +1,3 @@ - /* * This file is part of the libopencm3 project. * @@ -31,28 +30,28 @@ 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. @@ -66,6 +65,7 @@ SECTIONS */ /DISCARD/ : { *(.ARM.exidx) } + . = ALIGN(4); end = .; } -- cgit v1.2.3