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:
Sebastian Huber
2018-06-27 08:58:16 +02:00
parent c8df844cf3
commit 715d6167e0
78 changed files with 266 additions and 77 deletions
+3
View File
@@ -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;
+6 -2
View File
@@ -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. */
+6 -2
View File
@@ -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. */
+6 -2
View File
@@ -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. */
+5 -1
View File
@@ -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
+3 -2
View File
@@ -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 (.);
+4 -2
View File
@@ -252,14 +252,16 @@ SECTIONS
. += _StackSize;
_fstack = .;
WorkAreaBase = .;
. = ALIGN (16);
_stack_init = .;
_clear_end = .;
} > sdram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} > sdram
/DISCARD/ :
{
+4 -3
View File
@@ -251,14 +251,15 @@ SECTIONS
. += _StackSize;
_fstack = .;
WorkAreaBase = .;
. = ALIGN (16);
_stack_init = .;
_clear_end = .;
} > sdram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} > sdram
/DISCARD/ :
{
+5
View File
@@ -157,6 +157,11 @@ SECTIONS
. += _StackSize;
PROVIDE (__stack = .);
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
} > RAM
PROVIDE (_WorkAreaBase = .);
. = 0xa00000;
PROVIDE (_WorkAreaEnd = .);
+4
View File
@@ -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) }
+3
View File
@@ -180,7 +180,10 @@ SECTIONS
. = ALIGN (16);
PROVIDE (end = .);
_clear_end = .;
}
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
}
/* Stabs debugging sections. */
+4
View File
@@ -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) }
+5 -4
View File
@@ -155,12 +155,13 @@ SECTIONS
_end = .;
clear_end = .;
WorkAreaBase = .;
WorkAreaBase = .;
} > ram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} >ram
.stab 0 (NOLOAD) :
{
*(.stab)
+3
View File
@@ -191,7 +191,10 @@ SECTIONS {
. = ALIGN (16);
_stack_init = .;
_clear_end = .;
} >ram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} >ram
+3
View File
@@ -155,7 +155,10 @@ SECTIONS {
. = ALIGN (16);
_stack_init = .;
_clear_end = .;
} >ram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} >ram
+3
View File
@@ -157,7 +157,10 @@ SECTIONS {
. = ALIGN (16);
_stack_init = .;
_clear_end = .;
} >myram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} >myram
+3
View File
@@ -155,7 +155,10 @@ SECTIONS {
. = ALIGN (16);
_stack_init = .;
_clear_end = .;
} >ram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} >ram
+3 -2
View File
@@ -188,10 +188,11 @@ SECTIONS
_end = .;
clear_end = .;
} > ram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
WorkAreaBase = .;
} > ram
.stab 0 (NOLOAD) :
+3 -2
View File
@@ -188,10 +188,11 @@ SECTIONS
_end = .;
clear_end = .;
} > ram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
WorkAreaBase = .;
} > ram
.stab 0 (NOLOAD) :
+4
View File
@@ -179,6 +179,10 @@ SECTIONS
. += _StackSize;
. = ALIGN (16);
PROVIDE(_StackInit = .);
} >sram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
PROVIDE(WorkAreaBase = .);
} >sram
+4
View File
@@ -179,6 +179,10 @@ SECTIONS
. += _StackSize;
. = ALIGN (16);
PROVIDE(_StackInit = .);
} >sram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
PROVIDE(WorkAreaBase = .);
} >sram
+3
View File
@@ -187,7 +187,10 @@ SECTIONS
. = ALIGN (16);
PROVIDE (end = .);
_clear_end = .;
} > dram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} > dram
/* Stabs debugging sections. */
+3
View File
@@ -192,7 +192,10 @@ SECTIONS
. = ALIGN (16);
PROVIDE (end = .);
_clear_end = .;
} >ram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} >ram
/* Stabs debugging sections. */
+4
View File
@@ -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) }
+4
View File
@@ -180,6 +180,10 @@ SECTIONS
PROVIDE (_end = .);
_clear_end = .;
} > dram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} > dram
+4
View File
@@ -176,6 +176,10 @@ SECTIONS
PROVIDE (_end = .);
_clear_end = .;
} > dram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} > dram
+3 -1
View File
@@ -198,7 +198,9 @@ SECTIONS
. = ALIGN (16);
_stack_init = .;
_clear_end = .;
} > ram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} > ram
.stab . (NOLOAD) :
+4
View File
@@ -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
+4
View File
@@ -196,6 +196,10 @@ SECTIONS
. = ALIGN (16);
PROVIDE (end = .);
_clear_end = .;
} >ram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} >ram
+5 -4
View File
@@ -194,11 +194,12 @@ SECTIONS
_clear_end = .;
end = .;
_end = .;
. = ALIGN (1024);
WorkAreaBase = .;
} >ram
} >ram
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} >ram
/*
** DWARF debug sections.
+4 -1
View File
@@ -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. */
+6 -1
View File
@@ -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 = .;
+6 -1
View File
@@ -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 = .;
+4 -1
View File
@@ -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. */
+4 -1
View File
@@ -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. */
+3
View File
@@ -229,6 +229,9 @@ SECTIONS
_end = .;
_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
PROVIDE (end = .);
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
}
WorkAreaBase = .;
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
+4
View File
@@ -268,6 +268,10 @@ SECTIONS
_stack_low = ABSOLUTE(.);
. += StackSize;
_stack_high = ABSOLUTE(.);
} > onchip_memory_0
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
WorkAreaBase = .;
} > onchip_memory_0
+5 -1
View File
@@ -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. */
+1 -1
View File
@@ -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);
+5 -2
View File
@@ -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) }
+3 -3
View File
@@ -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);

Some files were not shown because too many files have changed in this diff Show More