Clean up and make linker scripts more uniform

This includes:

 - fix some comments indent,
 - add entry point,
 - align exported symbols,
 - remove unneeded "." assignments.
This commit is contained in:
Nicolas Schodet
2012-09-03 19:41:36 +02:00
parent 11727f56c9
commit 2a35377980
8 changed files with 37 additions and 41 deletions

View File

@@ -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 = .;
}