From da48bd9ee5768e9811e4fbbab964c7f9d64fce3d Mon Sep 17 00:00:00 2001 From: Marek BehĂșn Date: Thu, 20 May 2021 13:24:04 +0200 Subject: build: link with --build-id=none MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some toolchains are compiled so that they pass a --build-id=something parameter to the linker implicitly. This causes U-Boot LTO linking to fail with something like: ld: section .note.gnu.build-id LMA ... overlaps section .text LMA ... because U-Boot's link scripts do not currently handle .note.gnu.build-id section. Fix this by explicitly disabling build-id. Signed-off-by: Marek BehĂșn Reviewed-by: Simon Glass --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d2fdac7d315..a038c6d6b60 100644 --- a/Makefile +++ b/Makefile @@ -997,6 +997,8 @@ LDFLAGS_u-boot += $(LDFLAGS_FINAL) # Avoid 'Not enough room for program headers' error on binutils 2.28 onwards. LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker) +LDFLAGS_u-boot += --build-id=none + ifeq ($(CONFIG_ARC)$(CONFIG_NIOS2)$(CONFIG_X86)$(CONFIG_XTENSA),) LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) endif -- cgit v1.3.1