From 715d6167e07a46f5bc37f42993c209450484bbe8 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 19 Jun 2018 15:10:36 +0200 Subject: bsps: Support .rtemsstack.* linker input sections Use a dedicated memory region or place it between the BSS and workspace. Update #3459. --- bsps/arm/shared/start/linkcmds.base | 3 +++ bsps/bfin/TLL6527M/start/linkcmds | 8 ++++++-- bsps/bfin/bf537Stamp/start/linkcmds | 8 ++++++-- bsps/bfin/eZKit533/start/linkcmds | 8 ++++++-- bsps/epiphany/epiphany_sim/start/linkcmds | 6 +++++- bsps/i386/pc386/start/linkcmds | 5 +++-- bsps/lm32/lm32_evr/start/linkcmds | 6 ++++-- bsps/lm32/milkymist/start/linkcmds | 7 ++++--- bsps/m32c/m32cbsp/start/linkcmds | 5 +++++ bsps/m68k/av5282/start/linkcmds | 4 ++++ bsps/m68k/av5282/start/linkcmdsflash | 3 +++ bsps/m68k/av5282/start/linkcmdsram | 4 ++++ bsps/m68k/csb360/start/linkcmds | 9 +++++---- bsps/m68k/gen68340/start/linkcmds | 3 +++ bsps/m68k/gen68360/start/linkcmds | 3 +++ bsps/m68k/gen68360/start/linkcmds.bootp | 3 +++ bsps/m68k/gen68360/start/linkcmds.prom | 3 +++ bsps/m68k/mcf5206elite/start/linkcmds | 5 +++-- bsps/m68k/mcf5206elite/start/linkcmds.flash | 5 +++-- bsps/m68k/mcf52235/start/linkcmds | 4 ++++ bsps/m68k/mcf5225x/start/linkcmds | 4 ++++ bsps/m68k/mcf5235/start/linkcmds | 3 +++ bsps/m68k/mcf5235/start/linkcmdsflash | 3 +++ bsps/m68k/mcf5235/start/linkcmdsram | 4 ++++ bsps/m68k/mcf5329/start/linkcmds | 4 ++++ bsps/m68k/mcf5329/start/linkcmdsflash | 4 ++++ bsps/m68k/mrm332/start/linkcmds | 4 +++- bsps/m68k/shared/start/linkcmds.base | 4 ++++ bsps/m68k/uC5282/start/linkcmds | 4 ++++ bsps/mips/csb350/start/linkcmds | 9 +++++---- bsps/mips/hurricane/start/linkcmds | 5 ++++- bsps/mips/jmr3904/start/linkcmds | 7 ++++++- bsps/mips/malta/start/linkcmds | 7 ++++++- bsps/mips/rbtx4925/start/linkcmds | 5 ++++- bsps/mips/rbtx4938/start/linkcmds | 5 ++++- bsps/moxie/moxiesim/start/linkcmds | 3 +++ bsps/nios2/nios2_iss/start/linkcmds | 4 ++++ bsps/or1k/shared/start/linkcmds.base | 6 +++++- bsps/powerpc/gen5200/start/linkcmds.gen5200_base | 6 +++++- bsps/powerpc/gen83xx/start/linkcmds.mpc83xx | 2 +- bsps/powerpc/haleakala/start/linkcmds | 7 +++++-- bsps/powerpc/include/bsp/linker-symbols.h | 6 +++--- bsps/powerpc/mpc55xxevb/start/linkcmds.gwlcfm | 2 +- bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5566evb | 2 +- bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5643l_evb | 2 +- bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5668g | 2 +- bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674f_ecu508 | 2 +- bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674f_rsm6_base | 2 +- bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674fevb | 2 +- bsps/powerpc/mpc55xxevb/start/linkcmds.phycore_mpc5554 | 2 +- bsps/powerpc/mpc8260ads/start/linkcmds | 4 ++++ bsps/powerpc/psim/start/linkcmds | 2 +- bsps/powerpc/qemuppc/start/linkcmds | 2 +- bsps/powerpc/qoriq/start/linkcmds.qoriq_core_0 | 2 +- bsps/powerpc/qoriq/start/linkcmds.qoriq_core_1 | 2 +- bsps/powerpc/qoriq/start/linkcmds.qoriq_e500 | 2 +- bsps/powerpc/qoriq/start/linkcmds.qoriq_e6500_32 | 2 +- bsps/powerpc/qoriq/start/mmu-config.c | 2 +- bsps/powerpc/shared/start/linkcmds.base | 11 ++++++----- bsps/powerpc/shared/start/linkcmds.share | 4 ++++ bsps/powerpc/ss555/start/linkcmds | 4 ++++ bsps/powerpc/t32mppc/start/linkcmds.t32mppc | 2 +- bsps/powerpc/tqm8xx/start/linkcmds | 2 +- bsps/powerpc/virtex/start/linkcmds.in | 2 +- bsps/powerpc/virtex4/start/linkcmds | 7 +++++-- bsps/powerpc/virtex5/start/linkcmds | 7 +++++-- bsps/riscv/riscv_generic/start/linkcmds | 6 +++++- bsps/sh/gensh1/start/linkcmds | 4 ++++ bsps/sh/gensh2/start/linkcmds | 4 ++++ bsps/sh/gensh2/start/linkcmds.ram | 5 ++++- bsps/sh/gensh2/start/linkcmds.rom | 4 ++++ bsps/sh/gensh4/start/linkcmds | 10 ++++++---- bsps/sh/gensh4/start/linkcmds.rom | 5 ++++- bsps/sh/gensh4/start/linkcmds.rom2ram | 5 ++++- bsps/sh/shsim/start/linkcmds | 4 ++++ bsps/sparc/shared/start/linkcmds.base | 3 +++ bsps/sparc64/shared/start/linkcmds | 9 +++++++-- bsps/v850/gdbv850sim/start/linkcmds | 3 +++ 78 files changed, 266 insertions(+), 77 deletions(-) diff --git a/bsps/arm/shared/start/linkcmds.base b/bsps/arm/shared/start/linkcmds.base index c6314547eb..5a669d87a8 100644 --- a/bsps/arm/shared/start/linkcmds.base +++ b/bsps/arm/shared/start/linkcmds.base @@ -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; diff --git a/bsps/bfin/TLL6527M/start/linkcmds b/bsps/bfin/TLL6527M/start/linkcmds index 93d2a85d82..8c7b373864 100644 --- a/bsps/bfin/TLL6527M/start/linkcmds +++ b/bsps/bfin/TLL6527M/start/linkcmds @@ -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. */ diff --git a/bsps/bfin/bf537Stamp/start/linkcmds b/bsps/bfin/bf537Stamp/start/linkcmds index 47888ff798..c9925525c9 100644 --- a/bsps/bfin/bf537Stamp/start/linkcmds +++ b/bsps/bfin/bf537Stamp/start/linkcmds @@ -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. */ diff --git a/bsps/bfin/eZKit533/start/linkcmds b/bsps/bfin/eZKit533/start/linkcmds index e66a599e1f..0fc2da123d 100644 --- a/bsps/bfin/eZKit533/start/linkcmds +++ b/bsps/bfin/eZKit533/start/linkcmds @@ -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. */ diff --git a/bsps/epiphany/epiphany_sim/start/linkcmds b/bsps/epiphany/epiphany_sim/start/linkcmds index e0e216f21c..05e500e7d7 100644 --- a/bsps/epiphany/epiphany_sim/start/linkcmds +++ b/bsps/epiphany/epiphany_sim/start/linkcmds @@ -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 diff --git a/bsps/i386/pc386/start/linkcmds b/bsps/i386/pc386/start/linkcmds index 5fc3444c9e..01ec1e9371 100644 --- a/bsps/i386/pc386/start/linkcmds +++ b/bsps/i386/pc386/start/linkcmds @@ -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 (.); diff --git a/bsps/lm32/lm32_evr/start/linkcmds b/bsps/lm32/lm32_evr/start/linkcmds index 63747f33dc..d4b3147c63 100644 --- a/bsps/lm32/lm32_evr/start/linkcmds +++ b/bsps/lm32/lm32_evr/start/linkcmds @@ -252,14 +252,16 @@ SECTIONS . += _StackSize; _fstack = .; - WorkAreaBase = .; - . = ALIGN (16); _stack_init = .; _clear_end = .; } > sdram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + WorkAreaBase = .; + } > sdram /DISCARD/ : { diff --git a/bsps/lm32/milkymist/start/linkcmds b/bsps/lm32/milkymist/start/linkcmds index 9c38414238..6a2721005a 100644 --- a/bsps/lm32/milkymist/start/linkcmds +++ b/bsps/lm32/milkymist/start/linkcmds @@ -251,14 +251,15 @@ SECTIONS . += _StackSize; _fstack = .; - WorkAreaBase = .; - . = ALIGN (16); _stack_init = .; _clear_end = .; - } > sdram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + WorkAreaBase = .; + } > sdram /DISCARD/ : { diff --git a/bsps/m32c/m32cbsp/start/linkcmds b/bsps/m32c/m32cbsp/start/linkcmds index 48cc27e7ae..201b26fb2c 100644 --- a/bsps/m32c/m32cbsp/start/linkcmds +++ b/bsps/m32c/m32cbsp/start/linkcmds @@ -157,6 +157,11 @@ SECTIONS . += _StackSize; PROVIDE (__stack = .); + + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + } > RAM + PROVIDE (_WorkAreaBase = .); . = 0xa00000; PROVIDE (_WorkAreaEnd = .); diff --git a/bsps/m68k/av5282/start/linkcmds b/bsps/m68k/av5282/start/linkcmds index ff0fdda163..bf05d62018 100644 --- a/bsps/m68k/av5282/start/linkcmds +++ b/bsps/m68k/av5282/start/linkcmds @@ -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) } diff --git a/bsps/m68k/av5282/start/linkcmdsflash b/bsps/m68k/av5282/start/linkcmdsflash index e194add7b8..be694788dd 100644 --- a/bsps/m68k/av5282/start/linkcmdsflash +++ b/bsps/m68k/av5282/start/linkcmdsflash @@ -180,7 +180,10 @@ SECTIONS . = ALIGN (16); PROVIDE (end = .); _clear_end = .; + } + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } /* Stabs debugging sections. */ diff --git a/bsps/m68k/av5282/start/linkcmdsram b/bsps/m68k/av5282/start/linkcmdsram index 976c08a308..bb678af188 100644 --- a/bsps/m68k/av5282/start/linkcmdsram +++ b/bsps/m68k/av5282/start/linkcmdsram @@ -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) } diff --git a/bsps/m68k/csb360/start/linkcmds b/bsps/m68k/csb360/start/linkcmds index 09670c156d..25f3f3f15a 100644 --- a/bsps/m68k/csb360/start/linkcmds +++ b/bsps/m68k/csb360/start/linkcmds @@ -155,12 +155,13 @@ SECTIONS _end = .; clear_end = .; - - WorkAreaBase = .; - WorkAreaBase = .; - } > ram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + WorkAreaBase = .; + } >ram + .stab 0 (NOLOAD) : { *(.stab) diff --git a/bsps/m68k/gen68340/start/linkcmds b/bsps/m68k/gen68340/start/linkcmds index 860115930e..99eeb3bf70 100644 --- a/bsps/m68k/gen68340/start/linkcmds +++ b/bsps/m68k/gen68340/start/linkcmds @@ -191,7 +191,10 @@ SECTIONS { . = ALIGN (16); _stack_init = .; _clear_end = .; + } >ram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } >ram diff --git a/bsps/m68k/gen68360/start/linkcmds b/bsps/m68k/gen68360/start/linkcmds index 4ffc8bb57a..f3d6712988 100644 --- a/bsps/m68k/gen68360/start/linkcmds +++ b/bsps/m68k/gen68360/start/linkcmds @@ -155,7 +155,10 @@ SECTIONS { . = ALIGN (16); _stack_init = .; _clear_end = .; + } >ram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } >ram diff --git a/bsps/m68k/gen68360/start/linkcmds.bootp b/bsps/m68k/gen68360/start/linkcmds.bootp index ccd08a14a2..b97c66f3a1 100644 --- a/bsps/m68k/gen68360/start/linkcmds.bootp +++ b/bsps/m68k/gen68360/start/linkcmds.bootp @@ -157,7 +157,10 @@ SECTIONS { . = ALIGN (16); _stack_init = .; _clear_end = .; + } >myram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } >myram diff --git a/bsps/m68k/gen68360/start/linkcmds.prom b/bsps/m68k/gen68360/start/linkcmds.prom index 777700e6a1..6513ccd544 100644 --- a/bsps/m68k/gen68360/start/linkcmds.prom +++ b/bsps/m68k/gen68360/start/linkcmds.prom @@ -155,7 +155,10 @@ SECTIONS { . = ALIGN (16); _stack_init = .; _clear_end = .; + } >ram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } >ram diff --git a/bsps/m68k/mcf5206elite/start/linkcmds b/bsps/m68k/mcf5206elite/start/linkcmds index 817c80e298..d65e495943 100644 --- a/bsps/m68k/mcf5206elite/start/linkcmds +++ b/bsps/m68k/mcf5206elite/start/linkcmds @@ -188,10 +188,11 @@ SECTIONS _end = .; clear_end = .; + } > ram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; - WorkAreaBase = .; - } > ram .stab 0 (NOLOAD) : diff --git a/bsps/m68k/mcf5206elite/start/linkcmds.flash b/bsps/m68k/mcf5206elite/start/linkcmds.flash index 8d429ab209..e467ecb3b4 100644 --- a/bsps/m68k/mcf5206elite/start/linkcmds.flash +++ b/bsps/m68k/mcf5206elite/start/linkcmds.flash @@ -188,10 +188,11 @@ SECTIONS _end = .; clear_end = .; + } > ram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; - WorkAreaBase = .; - } > ram .stab 0 (NOLOAD) : diff --git a/bsps/m68k/mcf52235/start/linkcmds b/bsps/m68k/mcf52235/start/linkcmds index 7c7755cc21..3e912a210f 100644 --- a/bsps/m68k/mcf52235/start/linkcmds +++ b/bsps/m68k/mcf52235/start/linkcmds @@ -179,6 +179,10 @@ SECTIONS . += _StackSize; . = ALIGN (16); PROVIDE(_StackInit = .); + } >sram + + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) PROVIDE(WorkAreaBase = .); } >sram diff --git a/bsps/m68k/mcf5225x/start/linkcmds b/bsps/m68k/mcf5225x/start/linkcmds index 81d2058872..a2ad1ec047 100644 --- a/bsps/m68k/mcf5225x/start/linkcmds +++ b/bsps/m68k/mcf5225x/start/linkcmds @@ -179,6 +179,10 @@ SECTIONS . += _StackSize; . = ALIGN (16); PROVIDE(_StackInit = .); + } >sram + + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) PROVIDE(WorkAreaBase = .); } >sram diff --git a/bsps/m68k/mcf5235/start/linkcmds b/bsps/m68k/mcf5235/start/linkcmds index 660c931e26..8d98973a28 100644 --- a/bsps/m68k/mcf5235/start/linkcmds +++ b/bsps/m68k/mcf5235/start/linkcmds @@ -187,7 +187,10 @@ SECTIONS . = ALIGN (16); PROVIDE (end = .); _clear_end = .; + } > dram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } > dram /* Stabs debugging sections. */ diff --git a/bsps/m68k/mcf5235/start/linkcmdsflash b/bsps/m68k/mcf5235/start/linkcmdsflash index 832424a2d9..87dfadf8c0 100644 --- a/bsps/m68k/mcf5235/start/linkcmdsflash +++ b/bsps/m68k/mcf5235/start/linkcmdsflash @@ -192,7 +192,10 @@ SECTIONS . = ALIGN (16); PROVIDE (end = .); _clear_end = .; + } >ram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } >ram /* Stabs debugging sections. */ diff --git a/bsps/m68k/mcf5235/start/linkcmdsram b/bsps/m68k/mcf5235/start/linkcmdsram index ec7483001e..0f616890a8 100644 --- a/bsps/m68k/mcf5235/start/linkcmdsram +++ b/bsps/m68k/mcf5235/start/linkcmdsram @@ -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) } diff --git a/bsps/m68k/mcf5329/start/linkcmds b/bsps/m68k/mcf5329/start/linkcmds index 1982a91f7b..bed8dfe0fe 100644 --- a/bsps/m68k/mcf5329/start/linkcmds +++ b/bsps/m68k/mcf5329/start/linkcmds @@ -180,6 +180,10 @@ SECTIONS PROVIDE (_end = .); _clear_end = .; + } > dram + + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } > dram diff --git a/bsps/m68k/mcf5329/start/linkcmdsflash b/bsps/m68k/mcf5329/start/linkcmdsflash index af0cc4ee01..88a6f96ff0 100644 --- a/bsps/m68k/mcf5329/start/linkcmdsflash +++ b/bsps/m68k/mcf5329/start/linkcmdsflash @@ -176,6 +176,10 @@ SECTIONS PROVIDE (_end = .); _clear_end = .; + } > dram + + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } > dram diff --git a/bsps/m68k/mrm332/start/linkcmds b/bsps/m68k/mrm332/start/linkcmds index 1ee7117d6b..f86e80dd02 100644 --- a/bsps/m68k/mrm332/start/linkcmds +++ b/bsps/m68k/mrm332/start/linkcmds @@ -198,7 +198,9 @@ SECTIONS . = ALIGN (16); _stack_init = .; _clear_end = .; - + } > ram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } > ram .stab . (NOLOAD) : diff --git a/bsps/m68k/shared/start/linkcmds.base b/bsps/m68k/shared/start/linkcmds.base index 56af70d1da..ee1d6ea4e2 100644 --- a/bsps/m68k/shared/start/linkcmds.base +++ b/bsps/m68k/shared/start/linkcmds.base @@ -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 diff --git a/bsps/m68k/uC5282/start/linkcmds b/bsps/m68k/uC5282/start/linkcmds index a3b84294e3..9636fc28ca 100644 --- a/bsps/m68k/uC5282/start/linkcmds +++ b/bsps/m68k/uC5282/start/linkcmds @@ -196,6 +196,10 @@ SECTIONS . = ALIGN (16); PROVIDE (end = .); _clear_end = .; + } >ram + + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } >ram diff --git a/bsps/mips/csb350/start/linkcmds b/bsps/mips/csb350/start/linkcmds index b11b73bf42..d9d2d1c815 100644 --- a/bsps/mips/csb350/start/linkcmds +++ b/bsps/mips/csb350/start/linkcmds @@ -194,11 +194,12 @@ SECTIONS _clear_end = .; end = .; _end = .; - . = ALIGN (1024); - WorkAreaBase = .; - - } >ram + } >ram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + WorkAreaBase = .; + } >ram /* ** DWARF debug sections. diff --git a/bsps/mips/hurricane/start/linkcmds b/bsps/mips/hurricane/start/linkcmds index 4e10c29f6e..3ffaf52710 100644 --- a/bsps/mips/hurricane/start/linkcmds +++ b/bsps/mips/hurricane/start/linkcmds @@ -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. */ diff --git a/bsps/mips/jmr3904/start/linkcmds b/bsps/mips/jmr3904/start/linkcmds index 12a8a65b09..a3d64a4284 100644 --- a/bsps/mips/jmr3904/start/linkcmds +++ b/bsps/mips/jmr3904/start/linkcmds @@ -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 = .; diff --git a/bsps/mips/malta/start/linkcmds b/bsps/mips/malta/start/linkcmds index 3a71c5af8b..4e44bce110 100644 --- a/bsps/mips/malta/start/linkcmds +++ b/bsps/mips/malta/start/linkcmds @@ -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 = .; diff --git a/bsps/mips/rbtx4925/start/linkcmds b/bsps/mips/rbtx4925/start/linkcmds index 4f7de84115..7c75cb5d59 100644 --- a/bsps/mips/rbtx4925/start/linkcmds +++ b/bsps/mips/rbtx4925/start/linkcmds @@ -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. */ diff --git a/bsps/mips/rbtx4938/start/linkcmds b/bsps/mips/rbtx4938/start/linkcmds index 246e11debc..a9deef8cd9 100644 --- a/bsps/mips/rbtx4938/start/linkcmds +++ b/bsps/mips/rbtx4938/start/linkcmds @@ -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. */ diff --git a/bsps/moxie/moxiesim/start/linkcmds b/bsps/moxie/moxiesim/start/linkcmds index a4d9edac11..1df8cfb3fe 100644 --- a/bsps/moxie/moxiesim/start/linkcmds +++ b/bsps/moxie/moxiesim/start/linkcmds @@ -229,6 +229,9 @@ SECTIONS _end = .; _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; PROVIDE (end = .); + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + } WorkAreaBase = .; /* Stabs debugging sections. */ .stab 0 : { *(.stab) } diff --git a/bsps/nios2/nios2_iss/start/linkcmds b/bsps/nios2/nios2_iss/start/linkcmds index c08c37628a..b900718b6d 100644 --- a/bsps/nios2/nios2_iss/start/linkcmds +++ b/bsps/nios2/nios2_iss/start/linkcmds @@ -268,6 +268,10 @@ SECTIONS _stack_low = ABSOLUTE(.); . += StackSize; _stack_high = ABSOLUTE(.); + } > onchip_memory_0 + + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) WorkAreaBase = .; } > onchip_memory_0 diff --git a/bsps/or1k/shared/start/linkcmds.base b/bsps/or1k/shared/start/linkcmds.base index 4514596ba0..569e0a097f 100644 --- a/bsps/or1k/shared/start/linkcmds.base +++ b/bsps/or1k/shared/start/linkcmds.base @@ -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 diff --git a/bsps/powerpc/gen5200/start/linkcmds.gen5200_base b/bsps/powerpc/gen5200/start/linkcmds.gen5200_base index 1a92c7c9dd..a8841d2586 100644 --- a/bsps/powerpc/gen5200/start/linkcmds.gen5200_base +++ b/bsps/powerpc/gen5200/start/linkcmds.gen5200_base @@ -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. */ diff --git a/bsps/powerpc/gen83xx/start/linkcmds.mpc83xx b/bsps/powerpc/gen83xx/start/linkcmds.mpc83xx index 4ddbcd6f76..424e20ef33 100644 --- a/bsps/powerpc/gen83xx/start/linkcmds.mpc83xx +++ b/bsps/powerpc/gen83xx/start/linkcmds.mpc83xx @@ -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); diff --git a/bsps/powerpc/haleakala/start/linkcmds b/bsps/powerpc/haleakala/start/linkcmds index 8c06a5103b..98fea7f990 100644 --- a/bsps/powerpc/haleakala/start/linkcmds +++ b/bsps/powerpc/haleakala/start/linkcmds @@ -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) } diff --git a/bsps/powerpc/include/bsp/linker-symbols.h b/bsps/powerpc/include/bsp/linker-symbols.h index de7a6c483d..61e0da4158 100644 --- a/bsps/powerpc/include/bsp/linker-symbols.h +++ b/bsps/powerpc/include/bsp/linker-symbols.h @@ -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) diff --git a/bsps/powerpc/mpc55xxevb/start/linkcmds.gwlcfm b/bsps/powerpc/mpc55xxevb/start/linkcmds.gwlcfm index cabaac2201..0981a7906e 100644 --- a/bsps/powerpc/mpc55xxevb/start/linkcmds.gwlcfm +++ b/bsps/powerpc/mpc55xxevb/start/linkcmds.gwlcfm @@ -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); diff --git a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5566evb b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5566evb index 4f63fb0e0a..114d944f03 100644 --- a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5566evb +++ b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5566evb @@ -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); diff --git a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5643l_evb b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5643l_evb index 1977c92d59..82d2d4cb93 100644 --- a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5643l_evb +++ b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5643l_evb @@ -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); diff --git a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5668g b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5668g index 6c8e5a64f1..bbe39b806e 100644 --- a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5668g +++ b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5668g @@ -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); diff --git a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674f_ecu508 b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674f_ecu508 index 1e52a3c6c3..9b24b8f58e 100644 --- a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674f_ecu508 +++ b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674f_ecu508 @@ -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); diff --git a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674f_rsm6_base b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674f_rsm6_base index 8f6a403ca8..8f12295bd0 100644 --- a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674f_rsm6_base +++ b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674f_rsm6_base @@ -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); diff --git a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674fevb b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674fevb index 3113fb20b7..a226f4b3f9 100644 --- a/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674fevb +++ b/bsps/powerpc/mpc55xxevb/start/linkcmds.mpc5674fevb @@ -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); diff --git a/bsps/powerpc/mpc55xxevb/start/linkcmds.phycore_mpc5554 b/bsps/powerpc/mpc55xxevb/start/linkcmds.phycore_mpc5554 index 77b8abc5e0..a854908f1f 100644 --- a/bsps/powerpc/mpc55xxevb/start/linkcmds.phycore_mpc5554 +++ b/bsps/powerpc/mpc55xxevb/start/linkcmds.phycore_mpc5554 @@ -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); diff --git a/bsps/powerpc/mpc8260ads/start/linkcmds b/bsps/powerpc/mpc8260ads/start/linkcmds index f3092b862d..34fb69149b 100644 --- a/bsps/powerpc/mpc8260ads/start/linkcmds +++ b/bsps/powerpc/mpc8260ads/start/linkcmds @@ -301,6 +301,10 @@ SECTIONS clear_end = .; + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + } >ram + WorkAreaBase = .; /* Sections for compressed .text and .data */ diff --git a/bsps/powerpc/psim/start/linkcmds b/bsps/powerpc/psim/start/linkcmds index ba9319c91d..7ac828443d 100644 --- a/bsps/powerpc/psim/start/linkcmds +++ b/bsps/powerpc/psim/start/linkcmds @@ -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); diff --git a/bsps/powerpc/qemuppc/start/linkcmds b/bsps/powerpc/qemuppc/start/linkcmds index 3169ad2741..e3642c47a3 100644 --- a/bsps/powerpc/qemuppc/start/linkcmds +++ b/bsps/powerpc/qemuppc/start/linkcmds @@ -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); diff --git a/bsps/powerpc/qoriq/start/linkcmds.qoriq_core_0 b/bsps/powerpc/qoriq/start/linkcmds.qoriq_core_0 index 80ae3937bf..db31092faf 100644 --- a/bsps/powerpc/qoriq/start/linkcmds.qoriq_core_0 +++ b/bsps/powerpc/qoriq/start/linkcmds.qoriq_core_0 @@ -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); diff --git a/bsps/powerpc/qoriq/start/linkcmds.qoriq_core_1 b/bsps/powerpc/qoriq/start/linkcmds.qoriq_core_1 index ecb601b9ef..28ec68fe3d 100644 --- a/bsps/powerpc/qoriq/start/linkcmds.qoriq_core_1 +++ b/bsps/powerpc/qoriq/start/linkcmds.qoriq_core_1 @@ -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); diff --git a/bsps/powerpc/qoriq/start/linkcmds.qoriq_e500 b/bsps/powerpc/qoriq/start/linkcmds.qoriq_e500 index b727aefaa8..5328e73c5b 100644 --- a/bsps/powerpc/qoriq/start/linkcmds.qoriq_e500 +++ b/bsps/powerpc/qoriq/start/linkcmds.qoriq_e500 @@ -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); diff --git a/bsps/powerpc/qoriq/start/linkcmds.qoriq_e6500_32 b/bsps/powerpc/qoriq/start/linkcmds.qoriq_e6500_32 index 900147c163..4f8bbdfdbc 100644 --- a/bsps/powerpc/qoriq/start/linkcmds.qoriq_e6500_32 +++ b/bsps/powerpc/qoriq/start/linkcmds.qoriq_e6500_32 @@ -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); diff --git a/bsps/powerpc/qoriq/start/mmu-config.c b/bsps/powerpc/qoriq/start/mmu-config.c index b59d9c7114..3c5a8538c8 100644 --- a/bsps/powerpc/qoriq/start/mmu-config.c +++ b/bsps/powerpc/qoriq/start/mmu-config.c @@ -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), diff --git a/bsps/powerpc/shared/start/linkcmds.base b/bsps/powerpc/shared/start/linkcmds.base index 25a6414855..fa49edf7dd 100644 --- a/bsps/powerpc/shared/start/linkcmds.base +++ b/bsps/powerpc/shared/start/linkcmds.base @@ -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 { /* diff --git a/bsps/powerpc/shared/start/linkcmds.share b/bsps/powerpc/shared/start/linkcmds.share index 59f538e3a2..e2a3a16fbe 100644 --- a/bsps/powerpc/shared/start/linkcmds.share +++ b/bsps/powerpc/shared/start/linkcmds.share @@ -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)); diff --git a/bsps/powerpc/ss555/start/linkcmds b/bsps/powerpc/ss555/start/linkcmds index 8282d6c605..079dc84924 100644 --- a/bsps/powerpc/ss555/start/linkcmds +++ b/bsps/powerpc/ss555/start/linkcmds @@ -248,6 +248,10 @@ SECTIONS intrStack = .; PROVIDE(intrStackPtr = intrStack); + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + } + /* * Work Area * diff --git a/bsps/powerpc/t32mppc/start/linkcmds.t32mppc b/bsps/powerpc/t32mppc/start/linkcmds.t32mppc index 02367f57d0..81e1c3d817 100644 --- a/bsps/powerpc/t32mppc/start/linkcmds.t32mppc +++ b/bsps/powerpc/t32mppc/start/linkcmds.t32mppc @@ -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); diff --git a/bsps/powerpc/tqm8xx/start/linkcmds b/bsps/powerpc/tqm8xx/start/linkcmds index 7171d0230a..2d9e1e37e8 100644 --- a/bsps/powerpc/tqm8xx/start/linkcmds +++ b/bsps/powerpc/tqm8xx/start/linkcmds @@ -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); diff --git a/bsps/powerpc/virtex/start/linkcmds.in b/bsps/powerpc/virtex/start/linkcmds.in index 13f9217e9d..41fac076d7 100644 --- a/bsps/powerpc/virtex/start/linkcmds.in +++ b/bsps/powerpc/virtex/start/linkcmds.in @@ -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); diff --git a/bsps/powerpc/virtex4/start/linkcmds b/bsps/powerpc/virtex4/start/linkcmds index 50d3a3f13c..472c797fd2 100644 --- a/bsps/powerpc/virtex4/start/linkcmds +++ b/bsps/powerpc/virtex4/start/linkcmds @@ -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 */ diff --git a/bsps/powerpc/virtex5/start/linkcmds b/bsps/powerpc/virtex5/start/linkcmds index 9bd7c2e67f..4fd5243f3f 100644 --- a/bsps/powerpc/virtex5/start/linkcmds +++ b/bsps/powerpc/virtex5/start/linkcmds @@ -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 */ diff --git a/bsps/riscv/riscv_generic/start/linkcmds b/bsps/riscv/riscv_generic/start/linkcmds index 737ae75f32..9f71b66aa2 100644 --- a/bsps/riscv/riscv_generic/start/linkcmds +++ b/bsps/riscv/riscv_generic/start/linkcmds @@ -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 diff --git a/bsps/sh/gensh1/start/linkcmds b/bsps/sh/gensh1/start/linkcmds index d268d4cfc7..bb190f8c5a 100644 --- a/bsps/sh/gensh1/start/linkcmds +++ b/bsps/sh/gensh1/start/linkcmds @@ -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 ; diff --git a/bsps/sh/gensh2/start/linkcmds b/bsps/sh/gensh2/start/linkcmds index 2c4d44a941..e6db97e0c3 100644 --- a/bsps/sh/gensh2/start/linkcmds +++ b/bsps/sh/gensh2/start/linkcmds @@ -199,6 +199,10 @@ SECTIONS _WorkAreaBase = . ; + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + } > onchip_ram + _CPU_Interrupt_stack_low = 0xFFFFF000; _CPU_Interrupt_stack_high = 0xFFFFFFFF; diff --git a/bsps/sh/gensh2/start/linkcmds.ram b/bsps/sh/gensh2/start/linkcmds.ram index c5349398ff..8b53cd4f39 100644 --- a/bsps/sh/gensh2/start/linkcmds.ram +++ b/bsps/sh/gensh2/start/linkcmds.ram @@ -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; diff --git a/bsps/sh/gensh2/start/linkcmds.rom b/bsps/sh/gensh2/start/linkcmds.rom index 4934c10269..9f50cd7e64 100644 --- a/bsps/sh/gensh2/start/linkcmds.rom +++ b/bsps/sh/gensh2/start/linkcmds.rom @@ -206,6 +206,10 @@ SECTIONS _WorkAreaBase = . ; + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + } > onchip_ram + _CPU_Interrupt_stack_low = 0xFFFFF000; _CPU_Interrupt_stack_high = 0xFFFFFFFF; diff --git a/bsps/sh/gensh4/start/linkcmds b/bsps/sh/gensh4/start/linkcmds index de6bb05693..21e0fdc5c9 100644 --- a/bsps/sh/gensh4/start/linkcmds +++ b/bsps/sh/gensh4/start/linkcmds @@ -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 . */ } diff --git a/bsps/sh/gensh4/start/linkcmds.rom b/bsps/sh/gensh4/start/linkcmds.rom index 13c6096af1..5e37f06941 100644 --- a/bsps/sh/gensh4/start/linkcmds.rom +++ b/bsps/sh/gensh4/start/linkcmds.rom @@ -187,7 +187,10 @@ SECTIONS __bss_end = .; } > ram - . = ALIGN(16); + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + } > ram + _WorkAreaBase = . ; . = ALIGN(16); diff --git a/bsps/sh/gensh4/start/linkcmds.rom2ram b/bsps/sh/gensh4/start/linkcmds.rom2ram index cc14d4e98d..2fff0d1f98 100644 --- a/bsps/sh/gensh4/start/linkcmds.rom2ram +++ b/bsps/sh/gensh4/start/linkcmds.rom2ram @@ -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 = . ; diff --git a/bsps/sh/shsim/start/linkcmds b/bsps/sh/shsim/start/linkcmds index 41c7245da0..932d94161f 100644 --- a/bsps/sh/shsim/start/linkcmds +++ b/bsps/sh/shsim/start/linkcmds @@ -209,6 +209,10 @@ SECTIONS } > ram _stack = .; + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + } > ram + _WorkAreaBase = . ; _CPU_Interrupt_stack_low = 0x00080000 ; diff --git a/bsps/sparc/shared/start/linkcmds.base b/bsps/sparc/shared/start/linkcmds.base index 4c7750dfe0..7d5f86b23c 100644 --- a/bsps/sparc/shared/start/linkcmds.base +++ b/bsps/sparc/shared/start/linkcmds.base @@ -154,6 +154,9 @@ SECTIONS *(.rela.rtemsroset*) *(.rela.rtemsrwset*) } >ram + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + } > ram .data : { data_start = .; diff --git a/bsps/sparc64/shared/start/linkcmds b/bsps/sparc64/shared/start/linkcmds index 2f9db3a087..9cd4d99583 100644 --- a/bsps/sparc64/shared/start/linkcmds +++ b/bsps/sparc64/shared/start/linkcmds @@ -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; diff --git a/bsps/v850/gdbv850sim/start/linkcmds b/bsps/v850/gdbv850sim/start/linkcmds index 42dccab5ae..86613dd73d 100644 --- a/bsps/v850/gdbv850sim/start/linkcmds +++ b/bsps/v850/gdbv850sim/start/linkcmds @@ -194,6 +194,9 @@ SECTIONS } . += _StackSize; _stack = .; + .rtemsstack (NOLOAD) : { + *(SORT(.rtemsstack.*)) + } _WorkAreaBase = .; _end = . ; PROVIDE (end = .); -- cgit v1.2.3