From 304ad94b34c2117823169a199558e7484139caa1 Mon Sep 17 00:00:00 2001 From: Andrey Skvortsov Date: Tue, 5 Sep 2023 23:06:29 +0300 Subject: [PATCH] fix(build): don't generate build-id 1. build-id takes space in memory 2. in some cases for lto build linker decided to put new .note.gnu.build-id section before .text section. The result was non-working image, because entry point wasn't at __BLXX_START__ anymore. Signed-off-by: Andrey Skvortsov Change-Id: Id78ccbc51e5ef82296069444ab438a1964a74e78 --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index f55dfdd11..4713e87b3 100644 --- a/Makefile +++ b/Makefile @@ -361,6 +361,7 @@ else ifneq ($(findstring gcc,$(notdir $(LD))),) TF_LDFLAGS += -Wl,-z,common-page-size=4096 #Configure page size constants TF_LDFLAGS += -Wl,-z,max-page-size=4096 + TF_LDFLAGS += -Wl,--build-id=none ifeq ($(ENABLE_LTO),1) ifeq (${ARCH},aarch64) @@ -388,6 +389,7 @@ else TF_LDFLAGS += -z common-page-size=4096 # Configure page size constants TF_LDFLAGS += -z max-page-size=4096 + TF_LDFLAGS += --build-id=none # ld.lld doesn't recognize the errata flags, # therefore don't add those in that case.