]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
grub,grub-efi: Always use BFD linker with clang
authorKhem Raj <raj.khem@gmail.com>
Mon, 8 Sep 2025 21:06:56 +0000 (14:06 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Sep 2025 09:45:09 +0000 (10:45 +0100)
commitd1194c1a42fc7877a0c99c77e5291216a11ea5dc
tree2e5956f5cc52af26337191c7a2d2298ebe8c2909
parent560c7676b81fb344b7db538d65973a49807ab140
grub,grub-efi: Always use BFD linker with clang

LLD 21+ is erroring on text address being lower than the default
segment address for binaries. Erroring during configure e.g.

cannot link at address 0x2000

With LLD 21, -Ttext,<addr> only moves the .text section
it does not change the image base and LLD 21 errors out
if any section VMA is below the image base and the segment (image)
base still defaults to 0x400000 when using LLD, hence the error

LLD support in Grub needs to be done properly, it will need
to adjust how linker options are constructed in configure. We
default to use BFD linker always when using clang for now.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-bsp/grub/grub2.inc