From 0168efebab6f337f1fc55926172dd0309b248e1c Mon Sep 17 00:00:00 2001 From: Adrian Warecki Date: Tue, 10 Oct 2023 09:28:25 +0200 Subject: [PATCH] lmdk: Instruct linker to keep .buildinfo section At the beginning of the .text section there must be a structure containing information about the version of the api used by the library. It's absence will cause sof to interpret a random literal as a version and incorrectly load a library. Signed-off-by: Adrian Warecki --- lmdk/cmake/ldscripts/text_linker_script.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lmdk/cmake/ldscripts/text_linker_script.txt b/lmdk/cmake/ldscripts/text_linker_script.txt index cd4412efccae..d1d3e1fa0d5e 100644 --- a/lmdk/cmake/ldscripts/text_linker_script.txt +++ b/lmdk/cmake/ldscripts/text_linker_script.txt @@ -11,7 +11,7 @@ PHDRS { SECTIONS { .text : ALIGN(4096) { _text_start = ABSOLUTE(.); - *(.buildinfo) + KEEP(*(.buildinfo)) *(.gnu.linkonce.literal.*) *(.gnu.linkonce.lit4) *(.literal)