[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6739da7d-e555-407a-b5cb-e5681da71056@landley.net>
Date: Fri, 4 Jul 2025 14:15:18 -0500
From: Rob Landley <rob@...dley.net>
To: Linus Walleij <linus.walleij@...aro.org>,
Nathan Chancellor <nathan@...nel.org>
Cc: Russell King <linux@...linux.org.uk>, Christian Eggers <ceggers@...i.de>,
Arnd Bergmann <arnd@...db.de>, Yuntao Liu <liuyuntao12@...wei.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Rich Felker <dalias@...c.org>
Subject: Re: [PATCH 1/2] ARM: Require linker to support KEEP within OVERLAY
for DCE
On 3/13/25 03:48, Linus Walleij wrote:
> On Tue, Mar 11, 2025 at 8:43 PM Nathan Chancellor <nathan@...nel.org> wrote:
>
>> ld.lld prior to 21.0.0 does not support using the KEEP keyword within an
>> overlay description, which may be needed to avoid discarding necessary
>> sections within an overlay with '--gc-sections', which can be enabled
>> for the kernel via CONFIG_LD_DEAD_CODE_DATA_ELIMINATION.
>>
>> Disallow CONFIG_LD_DEAD_CODE_DATA_ELIMINATION without support for KEEP
>> within OVERLAY and introduce a macro, OVERLAY_KEEP, that can be used to
>> conditionally add KEEP when it is properly supported to avoid breaking
>> old versions of ld.lld.
I bisected the 6.15 armv7l build break my mkroot project hit to this
commit (e7607f7d6d81):
LD .tmp_vmlinux1
Segmentation fault
make[2]: *** [scripts/Makefile.vmlinux:77: vmlinux] Error 139
make[1]: ***
[/home/landley/toybox/clean/root/build/armv7l-tmp/linux/Makefile:1226:
vmlinux] Error 2
make: *** [Makefile:251: __sub-make] Error 2
The toolchain in question was built from gcc 11.4.0 and binutils 2.33.1
which were the newest versions supported by
https://github.com/richfelker/musl-cross-make when the still-current
musl release (1.2.5) came out.
You can grab a binary toolchain to smoketest with from
https://landley.net/bin/toolchains/latest/armv7l-linux-musleabihf-cross.tar.xz
and build using the attached miniconfig ala:
for i in distclean allnoconfig ""
do
CROSS_COMPILE=armv7l-linux-musleabihf- make ARCH=arm \
KCONFIG_ALLCONFIG=linux-miniconfig -j4 $i
done
This _just_ seems to affect armv7l: armv5l and aarch64 still build fine.
Rob
P.S. Rich has since added newer gcc version support to MCM, but:
A) the binutils in MCM is still stuck at the old version and if you
upgrade the gcc without the binutils it hits
https://lkml.org/lkml/2023/8/9/890
B) I'm waiting for musl-1.2.6 before updating the toolchain.
View attachment "linux-miniconfig" of type "text/plain" (1580 bytes)
Powered by blists - more mailing lists