aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/startup/ARMCMx/compilers/GCC/ld/rules_stacks.ld
diff options
context:
space:
mode:
Diffstat (limited to 'os/common/startup/ARMCMx/compilers/GCC/ld/rules_stacks.ld')
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/ld/rules_stacks.ld38
1 files changed, 38 insertions, 0 deletions
diff --git a/os/common/startup/ARMCMx/compilers/GCC/ld/rules_stacks.ld b/os/common/startup/ARMCMx/compilers/GCC/ld/rules_stacks.ld
new file mode 100644
index 000000000..c6aa6e048
--- /dev/null
+++ b/os/common/startup/ARMCMx/compilers/GCC/ld/rules_stacks.ld
@@ -0,0 +1,38 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+SECTIONS
+{
+ /* Special section for exceptions stack.*/
+ .mstack :
+ {
+ . = ALIGN(8);
+ __main_stack_base__ = .;
+ . += __main_stack_size__;
+ . = ALIGN(8);
+ __main_stack_end__ = .;
+ } > MAIN_STACK_RAM
+
+ /* Special section for process stack.*/
+ .pstack :
+ {
+ __process_stack_base__ = .;
+ __main_thread_stack_base__ = .;
+ . += __process_stack_size__;
+ . = ALIGN(8);
+ __process_stack_end__ = .;
+ __main_thread_stack_end__ = .;
+ } > PROCESS_STACK_RAM
+}