From 2f03b42bfc234e211e13eed3df3ea87a40833b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 20 May 2022 11:44:05 +0200 Subject: [PATCH] boards: arm: kl: keep cfmconfig sections in linker script This makes sure that this section is present even if LTO is enabled. --- boards/arm/kl/freedom-kl25z/scripts/freedom-kl25z.ld | 2 +- boards/arm/kl/freedom-kl26z/scripts/freedom-kl26z.ld | 2 +- boards/arm/kl/teensy-lc/scripts/teensy-lc.ld | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boards/arm/kl/freedom-kl25z/scripts/freedom-kl25z.ld b/boards/arm/kl/freedom-kl25z/scripts/freedom-kl25z.ld index 165055ea3e..5f59ac0c1b 100644 --- a/boards/arm/kl/freedom-kl25z/scripts/freedom-kl25z.ld +++ b/boards/arm/kl/freedom-kl25z/scripts/freedom-kl25z.ld @@ -43,7 +43,7 @@ SECTIONS } > vectflash .cfmprotect : { - *(.cfmconfig) + KEEP(*(.cfmconfig)) } > cfmprotect .text : { diff --git a/boards/arm/kl/freedom-kl26z/scripts/freedom-kl26z.ld b/boards/arm/kl/freedom-kl26z/scripts/freedom-kl26z.ld index fd1d583bc0..9d89206883 100644 --- a/boards/arm/kl/freedom-kl26z/scripts/freedom-kl26z.ld +++ b/boards/arm/kl/freedom-kl26z/scripts/freedom-kl26z.ld @@ -43,7 +43,7 @@ SECTIONS } > vectflash .cfmprotect : { - *(.cfmconfig) + KEEP(*(.cfmconfig)) } > cfmprotect .text : { diff --git a/boards/arm/kl/teensy-lc/scripts/teensy-lc.ld b/boards/arm/kl/teensy-lc/scripts/teensy-lc.ld index 1a922110d0..074acc2cd4 100644 --- a/boards/arm/kl/teensy-lc/scripts/teensy-lc.ld +++ b/boards/arm/kl/teensy-lc/scripts/teensy-lc.ld @@ -43,7 +43,7 @@ SECTIONS } > vectflash .cfmprotect : { - *(.cfmconfig) + KEEP(*(.cfmconfig)) } > cfmprotect .text : {