Skip to content

Commit ad8bd92

Browse files
committed
platform: Include TFM_BSS in zero table for link script templates
While the copy table included the default data segment for these templates, the zero table didn't include the default bss segment. Make sure that area gets initialized to zero using the table-based mechanism instead of relying on the startup code to initialize it explicitly. Signed-off-by: Keith Packard <keithp@keithp.com>
1 parent 37def1d commit ad8bd92

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

platform/ext/common/gcc/tfm_common_s.ld.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ SECTIONS
270270
/* .zero.table */
271271
. = ALIGN(4);
272272
__zero_table_start__ = .;
273+
LONG (ADDR(.TFM_BSS))
274+
LONG (SIZEOF(.TFM_BSS) / 4)
275+
273276
LONG (ADDR(.TFM_PSA_ROT_LINKER_BSS))
274277
LONG (SIZEOF(.TFM_PSA_ROT_LINKER_BSS) / 4)
275278

platform/ext/common/gcc/tfm_isolation_s.ld.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ SECTIONS
258258
/* .zero.table */
259259
. = ALIGN(4);
260260
__zero_table_start__ = .;
261+
LONG (ADDR(.TFM_BSS))
262+
LONG (SIZEOF(.TFM_BSS) / 4)
263+
261264
{% for partition in partitions %}
262265
LONG (ADDR(.ER_{{partition.manifest.name}}_BSS))
263266
LONG (SIZEOF(.ER_{{partition.manifest.name}}_BSS) / 4)

0 commit comments

Comments
 (0)