From: Rob Landley <rob@landley.net>
To: Linus Walleij <linus.walleij@linaro.org>,
Nathan Chancellor <nathan@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>,
Christian Eggers <ceggers@arri.de>, Arnd Bergmann <arnd@arndb.de>,
Yuntao Liu <liuyuntao12@huawei.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Rich Felker <dalias@libc.org>
Subject: Re: [PATCH 1/2] ARM: Require linker to support KEEP within OVERLAY for DCE
Date: Fri, 4 Jul 2025 14:15:18 -0500 [thread overview]
Message-ID: <6739da7d-e555-407a-b5cb-e5681da71056@landley.net> (raw)
In-Reply-To: <CACRpkdY-yxaiG89Co+C2=vyd0i6sh9pP0UGWZh1yUg4jd9jmuQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1916 bytes --]
On 3/13/25 03:48, Linus Walleij wrote:
> On Tue, Mar 11, 2025 at 8:43 PM Nathan Chancellor <nathan@kernel.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.
[-- Attachment #2: linux-miniconfig --]
[-- Type: text/plain, Size: 1580 bytes --]
# make ARCH=arm allnoconfig KCONFIG_ALLCONFIG=linux-miniconfig
# make ARCH=arm -j $(nproc)
# boot zImage console=ttyAMA0
# architecture independent
CONFIG_PANIC_TIMEOUT=1
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_RD_GZIP=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_SCRIPT=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT2=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_UTF8=y
CONFIG_MISC_FILESYSTEMS=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_XATTR=y
CONFIG_SQUASHFS_ZLIB=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_NET=y
CONFIG_NETDEVICES=y
CONFIG_NET_CORE=y
CONFIG_NETCONSOLE=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IPV6=y
CONFIG_ETHERNET=y
CONFIG_COMPAT_32BIT_TIME=y
CONFIG_EARLY_PRINTK=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# architecture specific
CONFIG_MMU=y
CONFIG_SOC_DRA7XX=y
CONFIG_VDSO=y
CONFIG_CPU_IDLE=y
CONFIG_KERNEL_MODE_NEON=y
CONFIG_ARCH_MULTI_V7=y
CONFIG_ARCH_VIRT=y
CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
CONFIG_ARCH_ALPINE=y
CONFIG_ARM_THUMB=y
CONFIG_ARM_CPUIDLE=y
CONFIG_ARM_LPAE=y
CONFIG_ATA=y
CONFIG_ATA_SFF=y
CONFIG_ATA_BMDMA=y
CONFIG_ATA_PIIX=y
CONFIG_ATA_GENERIC=y
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_MMIO=y
CONFIG_SERIAL_AMBA_PL011=y
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_DRV_PL031=y
CONFIG_PATA_PLATFORM=y
CONFIG_PATA_OF_PLATFORM=y
CONFIG_PCI=y
CONFIG_PCI_HOST_GENERIC=y
# architecture extra
next prev parent reply other threads:[~2025-07-04 20:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 19:43 [PATCH 0/2] ARM: Fix ARM_VECTORS with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION Nathan Chancellor
2025-03-11 19:43 ` [PATCH 1/2] ARM: Require linker to support KEEP within OVERLAY for DCE Nathan Chancellor
2025-03-13 8:48 ` Linus Walleij
2025-07-04 19:15 ` Rob Landley [this message]
2025-07-05 0:24 ` Nathan Chancellor
2025-07-05 19:53 ` Rob Landley
2025-03-11 19:43 ` [PATCH 2/2] ARM: add KEEP() keyword to ARM_VECTORS Nathan Chancellor
2025-03-13 8:49 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6739da7d-e555-407a-b5cb-e5681da71056@landley.net \
--to=rob@landley.net \
--cc=arnd@arndb.de \
--cc=ceggers@arri.de \
--cc=dalias@libc.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=liuyuntao12@huawei.com \
--cc=nathan@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox