projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add glue sections; change entrypoint;
[bertos.git]
/
cpu
/
arm
/
scripts
/
sam7s256_rom.ld
diff --git
a/cpu/arm/scripts/sam7s256_rom.ld
b/cpu/arm/scripts/sam7s256_rom.ld
index 6dc69c75f18cdeb95958ffdb3b22fcffa058e6df..26540d076074878e33154e72e1d3d7fbfd2d2fae 100644
(file)
--- a/
cpu/arm/scripts/sam7s256_rom.ld
+++ b/
cpu/arm/scripts/sam7s256_rom.ld
@@
-79,11
+79,20
@@
*/
*/
-ENTRY(
ResetHandler
)
+ENTRY(
_init
)
SEARCH_DIR(.)
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
SEARCH_DIR(.)
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
+/*
+ * Define memory configuration for AT91SAM7S
+ */
+MEMORY
+{
+ rom(rx) : org = 0x00100000, len = 256k
+ ram(rwx) : org = 0x00200000, len = 64k
+}
+
/*
* Define stack size here
/*
* Define stack size here
@@
-94,45
+103,41
@@
ABT_STACK_SIZE = 0x0100;
UND_STACK_SIZE = 0x0100;
SVC_STACK_SIZE = 0x0400;
UND_STACK_SIZE = 0x0100;
SVC_STACK_SIZE = 0x0400;
-/*
- * Define memory configuration for AT91SAM7S
- */
-MEMORY
-{
- rom(rx) : org = 0x00000000, len = 256k
- ram(rw) : org = 0x00200000, len = 64k
-}
-
/*
* Allocate section memory
*/
SECTIONS
{
/*
* Allocate section memory
*/
SECTIONS
{
- .text :
- {
- * ( .vectors );
- . = ALIGN ( 4 );
- * ( .init );
- . = ALIGN ( 4 );
+ .text :
+ {
+ * (.vectors);
+ . = ALIGN (4);
+ * (.init);
+ . = ALIGN (4);
+ * (.rodata);
+ . = ALIGN (4);
+ * (.rodata*);
+ . = ALIGN (4);
+ * (.text);
+ . = ALIGN (4);
+ *(.glue_7t);
+ . = ALIGN(4);
+ *(.glue_7);
+ . = ALIGN(4);
} > rom
} > rom
- . = ALIGN ( 4 );
_etext = .;
_etext = .;
- PROVIDE (
__etext = .
);
+ PROVIDE (
__etext = .
);
- .data : AT (
__etext
)
+ .data : AT (
__etext
)
{
{
- PROVIDE (
__data_start = .
);
- * (
.data
)
- . = ALIGN (
4
);
+ PROVIDE (
__data_start = .
);
+ * (
.data
)
+ . = ALIGN (
4
);
_edata = .;
_edata = .;
- PROVIDE ( __data_end = . );
- }
- > ram
+ PROVIDE (__data_end = .);
+ } > ram
-/*
- * Allocate bss section and stack.
- */
.bss :
{
PROVIDE (__bss_start = .);
.bss :
{
PROVIDE (__bss_start = .);
@@
-140,39
+145,41
@@
SECTIONS
*(COMMON)
. = ALIGN(4);
PROVIDE (__bss_end = .);
*(COMMON)
. = ALIGN(4);
PROVIDE (__bss_end = .);
+ } > ram
- . = ALIGN(256);
-
- PROVIDE (__stack_start = .);
+/*
+ * Allocate stack at the end of bss section.
+ * Data heap is allocate at end of stack.
+ */
+ PROVIDE (__stack_start = .);
-
PROVIDE (__stack_fiq_start = .);
-
. += FIQ_STACK_SIZE;
-
. = ALIGN(4);
-
PROVIDE (__stack_fiq_end = .);
+ PROVIDE (__stack_fiq_start = .);
+ . += FIQ_STACK_SIZE;
+ . = ALIGN(4);
+ PROVIDE (__stack_fiq_end = .);
-
PROVIDE (__stack_irq_start = .);
-
. += IRQ_STACK_SIZE;
-
. = ALIGN(4);
-
PROVIDE (__stack_irq_end = .);
+ PROVIDE (__stack_irq_start = .);
+ . += IRQ_STACK_SIZE;
+ . = ALIGN(4);
+ PROVIDE (__stack_irq_end = .);
-
PROVIDE (__stack_abt_start = .);
-
. += ABT_STACK_SIZE;
-
. = ALIGN(4);
-
PROVIDE (__stack_abt_end = .);
+ PROVIDE (__stack_abt_start = .);
+ . += ABT_STACK_SIZE;
+ . = ALIGN(4);
+ PROVIDE (__stack_abt_end = .);
-
PROVIDE (__stack_und_start = .);
-
. += UND_STACK_SIZE;
-
. = ALIGN(4);
-
PROVIDE (__stack_und_end = .);
+ PROVIDE (__stack_und_start = .);
+ . += UND_STACK_SIZE;
+ . = ALIGN(4);
+ PROVIDE (__stack_und_end = .);
-
PROVIDE (__stack_svc_start = .);
-
. += SVC_STACK_SIZE;
-
. = ALIGN(4);
-
PROVIDE (__stack_svc_end = .);
+ PROVIDE (__stack_svc_start = .);
+ . += SVC_STACK_SIZE;
+ . = ALIGN(4);
+ PROVIDE (__stack_svc_end = .);
-
PROVIDE (__stack_end = .);
+ PROVIDE (__stack_end = .);
- PROVIDE (__heap_start = .);
- } > ram
+ PROVIDE (__heap_start = .);
}
}