Skip to content

"Never resolved function from blockaddress" linking xfs.ko #1215

@arndb

Description

@arndb

Building randconfig arm64 kernels occasionally results in this error with LTO:

$ ld.lld -EL -maarch64elf -mllvm -import-instr-limit=5 -r -o xfs.lto.o --whole-archive xfs.o
ld.lld: error: Never resolved function from blockaddress (Producer: 'LLVM11.0.1' Reader: 'LLVM 11.0.1')

It turns out that this only happens in configurations that include xfs, but it also does happen for xfs as a loadable module, which makes it much easier to reproduce.

The attached archive contains a copy of the object files that go into an affected xfs.ko kernel module, with a oneline script for reproducing the problem.

xfs-lld-never-resolved-function.tar.gz
https://lore.kernel.org/lkml/CAK8P3a1Xfpt7QLkvxjtXKcgzcWkS8g9bmxD687+rqjTafTzKrg@mail.gmail.com/

Metadata

Metadata

Labels

Reported upstreamThis bug was filed on LLVM’s issue tracker, Phabricator, or the kernel mailing list.[ARCH] arm64This bug impacts ARCH=arm64[BUG] llvmA bug that should be fixed in upstream LLVM[FEATURE] LTORelated to building the kernel with LLVM Link Time Optimization[FIXED][LLVM] 15This bug was fixed in LLVM 15.x[TOOL] lldThe issue is relevant to LLD linker

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions