forked from Imagelibrary/rtems
bsps: Support .rtemsstack.* linker input sections
Use a dedicated memory region or place it between the BSS and workspace. Update #3459.
This commit is contained in:
@@ -335,6 +335,9 @@ SECTIONS {
|
||||
bsp_stack_secondary_processors_end = .;
|
||||
|
||||
*(.bsp_vector)
|
||||
} > REGION_VECTOR AT > REGION_VECTOR
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
bsp_section_vector_end = .;
|
||||
} > REGION_VECTOR AT > REGION_VECTOR
|
||||
bsp_section_vector_size = bsp_section_vector_end - bsp_section_vector_begin;
|
||||
|
||||
@@ -126,11 +126,15 @@ SECTIONS
|
||||
_stack_init = .;
|
||||
. += _StackSize;
|
||||
_clear_end = .;
|
||||
_WorkAreaBase = .;
|
||||
_end = .;
|
||||
__end = .;
|
||||
} > sdram
|
||||
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
_WorkAreaBase = .;
|
||||
} > sdram
|
||||
|
||||
/* Debugging stuff follows */
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
|
||||
@@ -134,11 +134,15 @@ SECTIONS
|
||||
_stack_init = .;
|
||||
. += _StackSize;
|
||||
_clear_end = .;
|
||||
_WorkAreaBase = .;
|
||||
_end = .;
|
||||
__end = .;
|
||||
} > sdram
|
||||
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
_WorkAreaBase = .;
|
||||
} > sdram
|
||||
|
||||
/* Debugging stuff follows */
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
|
||||
@@ -123,11 +123,15 @@ SECTIONS
|
||||
_stack_init = .;
|
||||
. += _StackSize;
|
||||
_clear_end = .;
|
||||
_WorkAreaBase = .;
|
||||
_end = .;
|
||||
__end = .;
|
||||
} > sdram
|
||||
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
_WorkAreaBase = .;
|
||||
} > sdram
|
||||
|
||||
/* Debugging stuff follows */
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
|
||||
@@ -305,7 +305,7 @@ SECTIONS {
|
||||
bsp_section_rodata_load_begin = LOADADDR (.rodata);
|
||||
bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size;
|
||||
|
||||
.rwbarrier : {
|
||||
.rwbarrier : {
|
||||
. = ALIGN(8);
|
||||
. = ALIGN (bsp_section_rwbarrier_align);
|
||||
} > REGION_DATA AT > REGION_DATA
|
||||
@@ -339,6 +339,10 @@ SECTIONS {
|
||||
} > REGION_BSS AT > REGION_BSS
|
||||
bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > REGION_WORK AT > REGION_WORK
|
||||
|
||||
.work : {
|
||||
/*
|
||||
* The work section will occupy the remaining REGION_WORK region and
|
||||
|
||||
@@ -204,9 +204,10 @@ SECTIONS
|
||||
. = ALIGN(. != 0 ? 32 / 8 : 1);
|
||||
}
|
||||
. = ALIGN(32 / 8);
|
||||
. = ALIGN(32 / 8);
|
||||
_end = .; PROVIDE (end = .);
|
||||
. = ALIGN(0x10);
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
}
|
||||
WorkAreaBase = .;
|
||||
. = DATA_SEGMENT_END (.);
|
||||
|
||||
|
||||
@@ -252,14 +252,16 @@ SECTIONS
|
||||
. += _StackSize;
|
||||
_fstack = .;
|
||||
|
||||
WorkAreaBase = .;
|
||||
|
||||
. = ALIGN (16);
|
||||
_stack_init = .;
|
||||
_clear_end = .;
|
||||
|
||||
} > sdram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} > sdram
|
||||
|
||||
/DISCARD/ :
|
||||
{
|
||||
|
||||
@@ -251,14 +251,15 @@ SECTIONS
|
||||
. += _StackSize;
|
||||
_fstack = .;
|
||||
|
||||
WorkAreaBase = .;
|
||||
|
||||
. = ALIGN (16);
|
||||
_stack_init = .;
|
||||
_clear_end = .;
|
||||
|
||||
} > sdram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} > sdram
|
||||
|
||||
/DISCARD/ :
|
||||
{
|
||||
|
||||
@@ -157,6 +157,11 @@ SECTIONS
|
||||
|
||||
. += _StackSize;
|
||||
PROVIDE (__stack = .);
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > RAM
|
||||
|
||||
PROVIDE (_WorkAreaBase = .);
|
||||
. = 0xa00000;
|
||||
PROVIDE (_WorkAreaEnd = .);
|
||||
|
||||
@@ -180,9 +180,13 @@ SECTIONS
|
||||
. = ALIGN (16);
|
||||
PROVIDE (end = .);
|
||||
_clear_end = .;
|
||||
} >ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} >ram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
|
||||
@@ -180,7 +180,10 @@ SECTIONS
|
||||
. = ALIGN (16);
|
||||
PROVIDE (end = .);
|
||||
_clear_end = .;
|
||||
}
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
}
|
||||
/* Stabs debugging sections. */
|
||||
|
||||
@@ -179,9 +179,13 @@ SECTIONS
|
||||
. = ALIGN (16);
|
||||
PROVIDE (end = .);
|
||||
_clear_end = .;
|
||||
} >ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} >ram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
|
||||
@@ -155,12 +155,13 @@ SECTIONS
|
||||
_end = .;
|
||||
|
||||
clear_end = .;
|
||||
|
||||
WorkAreaBase = .;
|
||||
WorkAreaBase = .;
|
||||
|
||||
} > ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} >ram
|
||||
|
||||
.stab 0 (NOLOAD) :
|
||||
{
|
||||
*(.stab)
|
||||
|
||||
@@ -191,7 +191,10 @@ SECTIONS {
|
||||
. = ALIGN (16);
|
||||
_stack_init = .;
|
||||
_clear_end = .;
|
||||
} >ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} >ram
|
||||
|
||||
|
||||
@@ -155,7 +155,10 @@ SECTIONS {
|
||||
. = ALIGN (16);
|
||||
_stack_init = .;
|
||||
_clear_end = .;
|
||||
} >ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} >ram
|
||||
|
||||
|
||||
@@ -157,7 +157,10 @@ SECTIONS {
|
||||
. = ALIGN (16);
|
||||
_stack_init = .;
|
||||
_clear_end = .;
|
||||
} >myram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} >myram
|
||||
|
||||
|
||||
@@ -155,7 +155,10 @@ SECTIONS {
|
||||
. = ALIGN (16);
|
||||
_stack_init = .;
|
||||
_clear_end = .;
|
||||
} >ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} >ram
|
||||
|
||||
|
||||
@@ -188,10 +188,11 @@ SECTIONS
|
||||
_end = .;
|
||||
|
||||
clear_end = .;
|
||||
} > ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
WorkAreaBase = .;
|
||||
|
||||
} > ram
|
||||
|
||||
.stab 0 (NOLOAD) :
|
||||
|
||||
@@ -188,10 +188,11 @@ SECTIONS
|
||||
_end = .;
|
||||
|
||||
clear_end = .;
|
||||
} > ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
WorkAreaBase = .;
|
||||
|
||||
} > ram
|
||||
|
||||
.stab 0 (NOLOAD) :
|
||||
|
||||
@@ -179,6 +179,10 @@ SECTIONS
|
||||
. += _StackSize;
|
||||
. = ALIGN (16);
|
||||
PROVIDE(_StackInit = .);
|
||||
} >sram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
PROVIDE(WorkAreaBase = .);
|
||||
} >sram
|
||||
|
||||
|
||||
@@ -179,6 +179,10 @@ SECTIONS
|
||||
. += _StackSize;
|
||||
. = ALIGN (16);
|
||||
PROVIDE(_StackInit = .);
|
||||
} >sram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
PROVIDE(WorkAreaBase = .);
|
||||
} >sram
|
||||
|
||||
|
||||
@@ -187,7 +187,10 @@ SECTIONS
|
||||
. = ALIGN (16);
|
||||
PROVIDE (end = .);
|
||||
_clear_end = .;
|
||||
} > dram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} > dram
|
||||
/* Stabs debugging sections. */
|
||||
|
||||
@@ -192,7 +192,10 @@ SECTIONS
|
||||
. = ALIGN (16);
|
||||
PROVIDE (end = .);
|
||||
_clear_end = .;
|
||||
} >ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} >ram
|
||||
/* Stabs debugging sections. */
|
||||
|
||||
@@ -187,9 +187,13 @@ SECTIONS
|
||||
. = ALIGN (16);
|
||||
PROVIDE (end = .);
|
||||
_clear_end = .;
|
||||
} >ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} >ram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
|
||||
@@ -180,6 +180,10 @@ SECTIONS
|
||||
PROVIDE (_end = .);
|
||||
|
||||
_clear_end = .;
|
||||
} > dram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} > dram
|
||||
|
||||
|
||||
@@ -176,6 +176,10 @@ SECTIONS
|
||||
PROVIDE (_end = .);
|
||||
|
||||
_clear_end = .;
|
||||
} > dram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} > dram
|
||||
|
||||
|
||||
@@ -198,7 +198,9 @@ SECTIONS
|
||||
. = ALIGN (16);
|
||||
_stack_init = .;
|
||||
_clear_end = .;
|
||||
|
||||
} > ram
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} > ram
|
||||
.stab . (NOLOAD) :
|
||||
|
||||
@@ -257,6 +257,10 @@ SECTIONS {
|
||||
} > REGION_DATA AT > REGION_DATA
|
||||
bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
|
||||
|
||||
.rtemsstack (NOLOAD) : ALIGN_WITH_INPUT {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > REGION_DATA AT > REGION_DATA
|
||||
|
||||
.work : ALIGN_WITH_INPUT {
|
||||
/*
|
||||
* The work section will occupy the remaining REGION_DATA region and
|
||||
|
||||
@@ -196,6 +196,10 @@ SECTIONS
|
||||
. = ALIGN (16);
|
||||
PROVIDE (end = .);
|
||||
_clear_end = .;
|
||||
} >ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} >ram
|
||||
|
||||
|
||||
@@ -194,11 +194,12 @@ SECTIONS
|
||||
_clear_end = .;
|
||||
end = .;
|
||||
_end = .;
|
||||
. = ALIGN (1024);
|
||||
WorkAreaBase = .;
|
||||
|
||||
} >ram
|
||||
} >ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} >ram
|
||||
|
||||
/*
|
||||
** DWARF debug sections.
|
||||
|
||||
@@ -172,9 +172,12 @@ SECTIONS
|
||||
_stack_init = .;
|
||||
end = .;
|
||||
_end = .;
|
||||
WorkAreaBase = .;
|
||||
}
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
}
|
||||
|
||||
/* Debug sections. These should never be loadable, but they must have
|
||||
zero addresses for the debuggers to work correctly. */
|
||||
|
||||
@@ -168,9 +168,14 @@ SECTIONS
|
||||
. += _StackSize;
|
||||
__stack = .;
|
||||
_stack_init = .;
|
||||
WorkAreaBase = .;
|
||||
_clear_end = .;
|
||||
}
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
}
|
||||
|
||||
. = 0x88400000; /* reserve some memory for Work Area */
|
||||
end = .;
|
||||
_end = .;
|
||||
|
||||
@@ -169,9 +169,14 @@ SECTIONS
|
||||
. += _StackSize;
|
||||
__stack = .;
|
||||
_stack_init = .;
|
||||
WorkAreaBase = .;
|
||||
_clear_end = .;
|
||||
}
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
}
|
||||
|
||||
. = 0x88400000; /* reserve some memory for Work Area */
|
||||
end = .;
|
||||
_end = .;
|
||||
|
||||
@@ -172,9 +172,12 @@ SECTIONS
|
||||
_stack_init = .;
|
||||
end = .;
|
||||
_end = .;
|
||||
WorkAreaBase = .;
|
||||
}
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
}
|
||||
|
||||
/* Debug sections. These should never be loadable, but they must have
|
||||
zero addresses for the debuggers to work correctly. */
|
||||
|
||||
@@ -172,9 +172,12 @@ SECTIONS
|
||||
_stack_init = .;
|
||||
end = .;
|
||||
_end = .;
|
||||
WorkAreaBase = .;
|
||||
}
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
}
|
||||
|
||||
/* Debug sections. These should never be loadable, but they must have
|
||||
zero addresses for the debuggers to work correctly. */
|
||||
|
||||
@@ -229,6 +229,9 @@ SECTIONS
|
||||
_end = .;
|
||||
_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
|
||||
PROVIDE (end = .);
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
}
|
||||
WorkAreaBase = .;
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
|
||||
@@ -268,6 +268,10 @@ SECTIONS
|
||||
_stack_low = ABSOLUTE(.);
|
||||
. += StackSize;
|
||||
_stack_high = ABSOLUTE(.);
|
||||
} > onchip_memory_0
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
WorkAreaBase = .;
|
||||
} > onchip_memory_0
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ SECTIONS {
|
||||
bsp_section_rodata_load_begin = LOADADDR (.rodata);
|
||||
bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size;
|
||||
|
||||
.rwbarrier : ALIGN_WITH_INPUT {
|
||||
.rwbarrier : ALIGN_WITH_INPUT {
|
||||
. = ALIGN (bsp_section_rwbarrier_align);
|
||||
} > REGION_DATA AT > REGION_DATA
|
||||
|
||||
@@ -288,6 +288,10 @@ SECTIONS {
|
||||
} > REGION_BSS AT > REGION_BSS
|
||||
bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
|
||||
|
||||
.rtemsstack (NOLOAD) : ALIGN_WITH_INPUT{
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > REGION_WORK AT > REGION_WORK
|
||||
|
||||
.work : ALIGN_WITH_INPUT {
|
||||
/*
|
||||
* The work section will occupy the remaining REGION_WORK region and
|
||||
|
||||
@@ -295,10 +295,14 @@ SECTIONS {
|
||||
bsp_interrupt_stack_end = bsp_interrupt_stack_start + 32k;
|
||||
bsp_interrupt_stack_size = bsp_interrupt_stack_end - bsp_interrupt_stack_start;
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > RAM
|
||||
|
||||
/*
|
||||
* BSP: Work area start
|
||||
*/
|
||||
bsp_work_area_start = bsp_interrupt_stack_end;
|
||||
bsp_work_area_start = .;
|
||||
WorkAreaBase = bsp_work_area_start;
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
|
||||
@@ -37,7 +37,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", WORK);
|
||||
REGION_ALIAS ("REGION_DATA", WORK);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", WORK);
|
||||
REGION_ALIAS ("REGION_BSS", WORK);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", WORK);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", WORK);
|
||||
REGION_ALIAS ("REGION_WORK", WORK);
|
||||
REGION_ALIAS ("REGION_STACK", WORK);
|
||||
REGION_ALIAS ("REGION_NOCACHE", EMPTY);
|
||||
|
||||
@@ -260,8 +260,11 @@ SECTIONS
|
||||
. += kMainStackSize;
|
||||
stack.end = .;
|
||||
|
||||
/* RTEMS workspace: size specified by application */
|
||||
WorkAreaBase = ALIGN(0x20);
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} >RAM
|
||||
|
||||
WorkAreaBase = .;
|
||||
|
||||
/* Debugging information */
|
||||
.line 0 : { *(.line) }
|
||||
|
||||
@@ -81,9 +81,9 @@ LINKER_SYMBOL(bsp_section_sbss_begin)
|
||||
LINKER_SYMBOL(bsp_section_sbss_end)
|
||||
LINKER_SYMBOL(bsp_section_sbss_size)
|
||||
|
||||
LINKER_SYMBOL(bsp_section_rwextra_begin)
|
||||
LINKER_SYMBOL(bsp_section_rwextra_end)
|
||||
LINKER_SYMBOL(bsp_section_rwextra_size)
|
||||
LINKER_SYMBOL(bsp_section_rtemsstack_begin)
|
||||
LINKER_SYMBOL(bsp_section_rtemsstack_end)
|
||||
LINKER_SYMBOL(bsp_section_rtemsstack_size)
|
||||
|
||||
LINKER_SYMBOL(bsp_section_work_begin)
|
||||
LINKER_SYMBOL(bsp_section_work_end)
|
||||
|
||||
@@ -17,7 +17,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_WORK", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
|
||||
|
||||
@@ -17,7 +17,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_WORK", RAM);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
|
||||
|
||||
@@ -23,7 +23,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM);
|
||||
REGION_ALIAS ("REGION_WORK", RAM_1);
|
||||
REGION_ALIAS ("REGION_STACK", RAM_1);
|
||||
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
|
||||
|
||||
@@ -19,7 +19,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM);
|
||||
REGION_ALIAS ("REGION_WORK", RAM);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
|
||||
|
||||
@@ -21,7 +21,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_WORK", RAM);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
|
||||
|
||||
@@ -18,7 +18,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM);
|
||||
REGION_ALIAS ("REGION_WORK", RAM);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
|
||||
|
||||
@@ -18,7 +18,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_WORK", RAM);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
|
||||
|
||||
@@ -26,7 +26,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_WORK", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
|
||||
|
||||
@@ -301,6 +301,10 @@ SECTIONS
|
||||
|
||||
clear_end = .;
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} >ram
|
||||
|
||||
WorkAreaBase = .;
|
||||
|
||||
/* Sections for compressed .text and .data */
|
||||
|
||||
@@ -26,7 +26,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", RAM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM);
|
||||
REGION_ALIAS ("REGION_WORK", RAM);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", EMPTY);
|
||||
|
||||
@@ -21,7 +21,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", ROM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM);
|
||||
REGION_ALIAS ("REGION_WORK", RAM);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", EMPTY);
|
||||
|
||||
@@ -24,7 +24,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", LOW);
|
||||
REGION_ALIAS ("REGION_DATA", HIGH);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", LOW);
|
||||
REGION_ALIAS ("REGION_BSS", HIGH);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", HIGH);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", HIGH);
|
||||
REGION_ALIAS ("REGION_WORK", HIGH);
|
||||
REGION_ALIAS ("REGION_STACK", HIGH);
|
||||
REGION_ALIAS ("REGION_NOCACHE", EMPTY);
|
||||
|
||||
@@ -23,7 +23,7 @@ REGION_ALIAS ("REGION_FAST_TEXT_LOAD", RAM);
|
||||
REGION_ALIAS ("REGION_FAST_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM);
|
||||
REGION_ALIAS ("REGION_WORK", RAM);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", EMPTY);
|
||||
|
||||
@@ -24,7 +24,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", LOW);
|
||||
REGION_ALIAS ("REGION_DATA", HIGH);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", LOW);
|
||||
REGION_ALIAS ("REGION_BSS", HIGH);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", HIGH);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", HIGH);
|
||||
REGION_ALIAS ("REGION_WORK", HIGH);
|
||||
REGION_ALIAS ("REGION_STACK", HIGH);
|
||||
REGION_ALIAS ("REGION_NOCACHE", EMPTY);
|
||||
|
||||
@@ -25,7 +25,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", LOW);
|
||||
REGION_ALIAS ("REGION_DATA", HIGH);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", LOW);
|
||||
REGION_ALIAS ("REGION_BSS", HIGH);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", HIGH);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", HIGH);
|
||||
REGION_ALIAS ("REGION_WORK", HIGH);
|
||||
REGION_ALIAS ("REGION_STACK", HIGH);
|
||||
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
|
||||
|
||||
@@ -131,7 +131,7 @@ static entry DATA config[] = {
|
||||
ENTRY_RW(bsp_section_data_begin, bsp_section_data_size),
|
||||
ENTRY_RW(bsp_section_sbss_begin, bsp_section_sbss_size),
|
||||
ENTRY_RW(bsp_section_bss_begin, bsp_section_bss_size),
|
||||
ENTRY_RW(bsp_section_rwextra_begin, bsp_section_rwextra_size),
|
||||
ENTRY_RW(bsp_section_rtemsstack_begin, bsp_section_rtemsstack_size),
|
||||
ENTRY_RW(bsp_section_stack_begin, bsp_section_stack_size),
|
||||
ENTRY_IO(bsp_section_nocache_begin, bsp_section_nocache_size),
|
||||
ENTRY_IO(bsp_section_nocachenoload_begin, bsp_section_nocachenoload_size),
|
||||
|
||||
@@ -319,12 +319,13 @@ SECTIONS {
|
||||
} > REGION_BSS AT > REGION_BSS
|
||||
bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
|
||||
|
||||
.rwextra : ALIGN_WITH_INPUT {
|
||||
bsp_section_rwextra_begin = .;
|
||||
.rtemsstack (NOLOAD) : ALIGN_WITH_INPUT {
|
||||
bsp_section_rtemsstack_begin = .;
|
||||
*(.bsp_rwextra)
|
||||
bsp_section_rwextra_end = .;
|
||||
} > REGION_RWEXTRA AT > REGION_RWEXTRA
|
||||
bsp_section_rwextra_size = bsp_section_rwextra_end - bsp_section_rwextra_begin;
|
||||
*(SORT(.rtemsstack.*))
|
||||
bsp_section_rtemsstack_end = .;
|
||||
} > REGION_RTEMSSTACK AT > REGION_RTEMSSTACK
|
||||
bsp_section_rtemsstack_size = bsp_section_rtemsstack_end - bsp_section_rtemsstack_begin;
|
||||
|
||||
.work : ALIGN_WITH_INPUT {
|
||||
/*
|
||||
|
||||
@@ -98,6 +98,10 @@ SECTIONS
|
||||
_TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
|
||||
_TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} >CODE
|
||||
|
||||
/* Adjust the address for the data segment. We want to adjust up to
|
||||
the same address within the page on the next page up. */
|
||||
. = ALIGN(0x10000) + (. & (0x10000 - 1));
|
||||
|
||||
@@ -248,6 +248,10 @@ SECTIONS
|
||||
intrStack = .;
|
||||
PROVIDE(intrStackPtr = intrStack);
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
}
|
||||
|
||||
/*
|
||||
* Work Area
|
||||
*
|
||||
|
||||
@@ -17,7 +17,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", RAM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM);
|
||||
REGION_ALIAS ("REGION_WORK", RAM);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", RAM);
|
||||
|
||||
@@ -25,7 +25,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", RAM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM);
|
||||
REGION_ALIAS ("REGION_WORK", RAM);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", EMPTY);
|
||||
|
||||
@@ -19,7 +19,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM);
|
||||
REGION_ALIAS ("REGION_DATA", RAM);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", RAM);
|
||||
REGION_ALIAS ("REGION_BSS", RAM);
|
||||
REGION_ALIAS ("REGION_RWEXTRA", RAM);
|
||||
REGION_ALIAS ("REGION_RTEMSSTACK", RAM);
|
||||
REGION_ALIAS ("REGION_WORK", RAM);
|
||||
REGION_ALIAS ("REGION_STACK", RAM);
|
||||
REGION_ALIAS ("REGION_NOCACHE", EMPTY);
|
||||
|
||||
@@ -260,8 +260,11 @@ SECTIONS
|
||||
. += StackSize;
|
||||
__stack_base = .; /* Initial stack builds downwards */
|
||||
|
||||
/* RTEMS workspace: size specified by application */
|
||||
WorkAreaBase = ALIGN(0x10); /* Align to a cache-line boundary */
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} >RAM
|
||||
|
||||
WorkAreaBase = .;
|
||||
|
||||
/* The heap comes after the work space */
|
||||
|
||||
|
||||
@@ -260,8 +260,11 @@ SECTIONS
|
||||
. += StackSize;
|
||||
__stack_base = .; /* Initial stack builds downwards */
|
||||
|
||||
/* RTEMS workspace: size specified by application */
|
||||
WorkAreaBase = ALIGN(0x20); /* Align to a cache-line boundary */
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} >RAM
|
||||
|
||||
WorkAreaBase = .;
|
||||
|
||||
/* The heap comes after the work space */
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ SECTIONS {
|
||||
} > REGION_HTIF AT > REGION_HTIF_LOAD
|
||||
|
||||
|
||||
.rwbarrier : {
|
||||
.rwbarrier : {
|
||||
. = ALIGN(8);
|
||||
. = ALIGN (bsp_section_rwbarrier_align);
|
||||
} > REGION_DATA AT > REGION_DATA
|
||||
@@ -347,6 +347,10 @@ SECTIONS {
|
||||
} > REGION_BSS AT > REGION_BSS
|
||||
bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > REGION_WORK AT > REGION_WORK
|
||||
|
||||
.work : {
|
||||
/*
|
||||
* The work section will occupy the remaining REGION_WORK region and
|
||||
|
||||
@@ -188,6 +188,10 @@ SECTIONS
|
||||
|
||||
_WorkAreaBase = . ;
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > onchip_ram
|
||||
|
||||
_CPU_Interrupt_stack_low = 0x0f000000 ;
|
||||
_CPU_Interrupt_stack_high = _CPU_Interrupt_stack_low + 4096 ;
|
||||
|
||||
|
||||
@@ -199,6 +199,10 @@ SECTIONS
|
||||
|
||||
_WorkAreaBase = . ;
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > onchip_ram
|
||||
|
||||
_CPU_Interrupt_stack_low = 0xFFFFF000;
|
||||
_CPU_Interrupt_stack_high = 0xFFFFFFFF;
|
||||
|
||||
|
||||
@@ -200,7 +200,10 @@ SECTIONS
|
||||
PROVIDE (end = .);
|
||||
|
||||
_WorkAreaBase = . ;
|
||||
. = 0x00480000 ;
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > onchip_ram
|
||||
|
||||
_CPU_Interrupt_stack_low = 0xFFFFF000;
|
||||
_CPU_Interrupt_stack_high = 0xFFFFFFFF;
|
||||
|
||||
@@ -206,6 +206,10 @@ SECTIONS
|
||||
|
||||
_WorkAreaBase = . ;
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > onchip_ram
|
||||
|
||||
_CPU_Interrupt_stack_low = 0xFFFFF000;
|
||||
_CPU_Interrupt_stack_high = 0xFFFFFFFF;
|
||||
|
||||
|
||||
@@ -144,11 +144,14 @@ SECTIONS
|
||||
__bss_end = .;
|
||||
} > ram
|
||||
|
||||
.stack . : {
|
||||
.stack : {
|
||||
. = . + 4096;
|
||||
}
|
||||
} > ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > ram
|
||||
|
||||
. = ALIGN(16);
|
||||
_WorkAreaBase = . ;
|
||||
|
||||
. = ALIGN(16);
|
||||
@@ -188,6 +191,5 @@ SECTIONS
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
.stack : { _stack = .; *(.stack) }
|
||||
/* These must appear regardless of . */
|
||||
}
|
||||
|
||||
@@ -187,7 +187,10 @@ SECTIONS
|
||||
__bss_end = .;
|
||||
} > ram
|
||||
|
||||
. = ALIGN(16);
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > ram
|
||||
|
||||
_WorkAreaBase = . ;
|
||||
|
||||
. = ALIGN(16);
|
||||
|
||||
@@ -190,7 +190,10 @@ SECTIONS
|
||||
*(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
|
||||
*(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
|
||||
} >ram
|
||||
. = ALIGN(16);
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > ram
|
||||
|
||||
_WorkAreaBase = . ;
|
||||
|
||||
|
||||
@@ -209,6 +209,10 @@ SECTIONS
|
||||
} > ram
|
||||
_stack = .;
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > ram
|
||||
|
||||
_WorkAreaBase = . ;
|
||||
|
||||
_CPU_Interrupt_stack_low = 0x00080000 ;
|
||||
|
||||
@@ -154,6 +154,9 @@ SECTIONS
|
||||
*(.rela.rtemsroset*)
|
||||
*(.rela.rtemsrwset*)
|
||||
} >ram
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
} > ram
|
||||
.data :
|
||||
{
|
||||
data_start = .;
|
||||
|
||||
@@ -206,9 +206,14 @@ SECTIONS
|
||||
end = .;
|
||||
_end = .;
|
||||
__end = .;
|
||||
|
||||
. = ALIGN (16); /* arbitrary alignment */
|
||||
} > ram
|
||||
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
PROVIDE (WorkAreaBase = .);
|
||||
} > ram
|
||||
|
||||
.heap : {
|
||||
. += HeapSize;
|
||||
PROVIDE (HeapBase = .);
|
||||
. += HeapSize;
|
||||
|
||||
@@ -194,6 +194,9 @@ SECTIONS
|
||||
}
|
||||
. += _StackSize;
|
||||
_stack = .;
|
||||
.rtemsstack (NOLOAD) : {
|
||||
*(SORT(.rtemsstack.*))
|
||||
}
|
||||
_WorkAreaBase = .;
|
||||
_end = . ;
|
||||
PROVIDE (end = .);
|
||||
|
||||
Reference in New Issue
Block a user