diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2021-05-20 13:24:04 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-05-24 14:21:30 -0400 |
commit | da48bd9ee5768e9811e4fbbab964c7f9d64fce3d (patch) | |
tree | 478d8f917782283f6470fac4a1c39ead68be5566 /scripts | |
parent | c1094987d1dc4701646c5f3aa254e7a92a02d305 (diff) | |
download | u-boot-da48bd9ee5768e9811e4fbbab964c7f9d64fce3d.tar.gz u-boot-da48bd9ee5768e9811e4fbbab964c7f9d64fce3d.tar.bz2 u-boot-da48bd9ee5768e9811e4fbbab964c7f9d64fce3d.zip |
build: link with --build-id=none
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 <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.spl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 7872cbaabe..5be1a9ba1b 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -399,6 +399,8 @@ LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL) # Avoid 'Not enough room for program headers' error on binutils 2.28 onwards. LDFLAGS_$(SPL_BIN) += $(call ld-option, --no-dynamic-linker) +LDFLAGS_$(SPL_BIN) += --build-id=none + # Pick the best-match (i.e. SPL_TEXT_BASE for SPL, TPL_TEXT_BASE for TPL) ifneq ($(CONFIG_$(SPL_TPL_)TEXT_BASE),) LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_$(SPL_TPL_)TEXT_BASE) |