llvm / llvm/llvm-project

Error while cross compiling linux kernel

Open
#172,988 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

crash incomplete lld:ELF
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Stack dump:
```
0. Program arguments: ld.lld -m elf_i386 --fatal-warnings -z noexecstack -r -o vmlinux.o --whole-archive vmlinux.a --no-whole-archive --start-group --end-group
#0 0x0000007c91d44230 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/libLLVM.so.21.1+0xc24230)
#1 0x0000007c91d414e4 (/usr/lib/libLLVM.so.21.1+0xc214e4)
#2 0x0000007c9aff284c
#3 0x0000007c9ae47d18 lld::elf::OutputSection::recordSection(lld::elf::InputSectionBase*) (/usr/lib/liblldELF.so.21.1+0x1d7d18)
#4 0x0000007c9ae10df0 lld::elf::LinkerScript::addOrphanSections() (/usr/lib/liblldELF.so.21.1+0x1a0df0)
#5 0x0000007c9ad73f7c void lld::elf::LinkerDriver::link>(llvm::opt::InputArgList&) (/usr/lib/liblldELF.so.21.1+0x103f7c)
#6 0x0000007c9ad8004c lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef) (/usr/lib/liblldELF.so.21.1+0x11004c)
#7 0x0000007c9ad81fbc lld::elf::link(llvm::ArrayRef, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/usr/lib/liblldELF.so.21.1+0x111fbc)
#8 0x0000007c9a85d428 lld::unsafeLldMain(llvm::ArrayRef, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef, bool) (/usr/lib/liblldCommon.so.21.1+0xd428)
#9 0x00000030000026cc main (/usr/bin/ld.lld+0x26cc)
#10 0x0000007c90ca23d4 (/usr/lib/libc.so.6+0x223d4)
#11 0x0000007c90ca24b8 __libc_start_main (/usr/lib/libc.so.6+0x224b8)
#12 0x0000003000002770 _start (/usr/bin/ld.lld+0x2770)
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the shown ld.lld command for the Linux kernel cross-link and inspect the stack entry points lld::elf::OutputSection::recordSection and lld::elf::LinkerScript::addOrphanSections. Reduce the failing inputs or configuration enough to identify the triggering section; done means the crash is resolved or replaced by a clear diagnostic, with the reproduction captured for verification.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
compilers, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.