summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/ec.lds.S8
-rw-r--r--core/cortex-m/link_defs.h5
2 files changed, 9 insertions, 4 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index cb0f38f35a..339ee4f435 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -122,6 +122,12 @@ SECTIONS
} > FLASH
#endif
__ro_end = . ;
+
+ __deferred_funcs_count =
+ (__deferred_funcs_end - __deferred_funcs) / 4;
+ ASSERT(__deferred_funcs_count <= DEFERRABLE_MAX_COUNT,
+ "Increase DEFERRABLE_MAX_COUNT")
+
.bss : {
/* Stacks must be 64-bit aligned */
. = ALIGN(8);
diff --git a/core/cortex-m/link_defs.h b/core/cortex-m/link_defs.h
index dbf2757b21..f78a7c46c4 100644
--- a/core/cortex-m/link_defs.h
+++ b/core/cortex-m/link_defs.h
@@ -44,9 +44,8 @@ extern const struct hook_data __hooks_second[];
extern const struct hook_data __hooks_second_end[];
/* Deferrable functions */
-static const struct deferred_data __deferred_funcs[];
-static const struct deferred_data __deferred_funcs_end[];
-
+extern const struct deferred_data __deferred_funcs[];
+extern const struct deferred_data __deferred_funcs_end[];
/* Host commands */
extern const struct host_command __hcmds[];