zephyr/arch/common/fill_with_zeros.ld
Patryk Duda a17fe86de2 arch: common: Force linker to fill empty spaces in rom_start with 0x00
LLVM LLD fills empty spaces (created using ALIGN() or moving the
location counter) in executable segments with TrapInstr pattern,
e.g. for ARM the TrapInstr pattern is 0xd4d4d4d4. GNU LD fills
empty spaces with 0x00 pattern.

We may want to have some section (e.g. rom_start) filled with 0x00,
e.g. because MCU can interpret the pattern as a configuration data.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2023-09-13 11:46:56 +02:00

17 lines
487 B
Plaintext

/*
* Copyright (c) 2023, Google, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* LLVM LLD fills empty spaces (created using ALIGN() or moving the location
* counter) in executable segments with TrapInstr pattern, e.g. for ARM the
* TrapInstr pattern is 0xd4d4d4d4. GNU LD fills empty spaces with 0x00
* pattern.
*
* We may want to have some section (e.g. rom_start) filled with 0x00,
* e.g. because MCU can interpret the pattern as a configuration data.
*/
FILL(0x00);