Skip to content

Commit 3922c78

Browse files
committed
[zep noup] 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 <[email protected]>
1 parent e4d0a13 commit 3922c78

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
@@ -276,6 +276,9 @@ SECTIONS
276276
/* .zero.table */
277277
. = ALIGN(4);
278278
__zero_table_start__ = .;
279+
LONG (ADDR(.TFM_BSS))
280+
LONG (SIZEOF(.TFM_BSS) / 4)
281+
279282
LONG (ADDR(.TFM_PSA_ROT_LINKER_BSS))
280283
LONG (SIZEOF(.TFM_PSA_ROT_LINKER_BSS) / 4) /* Aligment checked after the section */
281284

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ SECTIONS
264264
/* .zero.table */
265265
. = ALIGN(4);
266266
__zero_table_start__ = .;
267+
LONG (ADDR(.TFM_BSS))
268+
LONG (SIZEOF(.TFM_BSS) / 4)
269+
267270
{% for partition in partitions %}
268271
LONG (ADDR(.ER_{{partition.manifest.name}}_BSS))
269272
LONG (SIZEOF(.ER_{{partition.manifest.name}}_BSS) / 4) /* Aligment checked after the section */

0 commit comments

Comments
 (0)