summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic (Chun-Ju) Yang <victoryang@chromium.org>2013-11-28 10:05:28 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-12-02 04:54:29 +0000
commit5a3c90d5db8ce869cad977ed143a198e221689ae (patch)
treefcccf2c7c052158ad4c2f8e808f46507e78161c7
parentca8289258d14923f3ce375654f2daae18c110c39 (diff)
downloadchrome-ec-5a3c90d5db8ce869cad977ed143a198e221689ae.tar.gz
Add a BSS section for large alignment
BSS section is usually put at the beginning of the RAM, so large alignemnt causes the least memory usage penalty here, compared to alignment using __attribute__((aligned(x))). Also remove .bss.tasks and .bss.task_scratchpad, which are both not present anymore. BUG=chrome-os-partner:24107 TEST=Build all boards. Boot mec1322_evb. BRANCH=None Change-Id: Ie19b9feb76773a94f0443c2a0d39505ddef7a1df Signed-off-by: Vic (Chun-Ju) Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/178274 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--core/cortex-m/ec.lds.S13
1 files changed, 9 insertions, 4 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 093b47bb20..c0c87e1343 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -141,11 +141,16 @@ SECTIONS
"Increase DEFERRABLE_MAX_COUNT")
.bss : {
- /* Stacks must be 64-bit aligned */
- . = ALIGN(8);
+ /*
+ * Align to 512 bytes. This is convenient when some memory block
+ * need big alignment. When COMPILE_FOR_RAM is not set, this is the
+ * beginning of the RAM, so there is usually no penalty on aligning
+ * this.
+ */
+ . = ALIGN(512);
__bss_start = .;
- *(.bss.tasks)
- *(.bss.task_scratchpad)
+ *(.bss.big_align)
+ /* Stacks must be 64-bit aligned */
. = ALIGN(8);
*(.bss.system_stack)
/* Rest of .bss takes care of its own alignment */