-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]incompleteIssue not complete (e.g. missing a reproducer, build arguments, etc.)Issue not complete (e.g. missing a reproducer, build arguments, etc.)lld:ELF
Description
Facing a linker crash when cross compiling a C/C++ based internal kernel module.
Linker Command being used: ld.lld -r --whole-archive {input_files} -o {output_file}
Crash backtrace:
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 ld.lld 0x0000000000951fed
1 libc.so.6 0x00007f64fa23e730
2 ld.lld 0x0000000000b378cb
3 ld.lld 0x0000000000b37e53 lld::elf::LinkerScript::addOrphanSections() + 771
4 ld.lld 0x0000000000a993e5 void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) + 3125
5 ld.lld 0x0000000000aa0807 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) + 6743
6 ld.lld 0x0000000000aa2108 lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) + 5784
7 ld.lld 0x000000000098536d lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) + 1053
8 ld.lld 0x00000000008cf96f lld_main(int, char**, llvm::ToolContext const&) + 623
9 ld.lld 0x0000000000801612 main + 114
10 libc.so.6 0x00007f64fa2295d0
11 libc.so.6 0x00007f64fa229680 __libc_start_main + 128
12 ld.lld 0x00000000008cf237
/bin/bash: line 3: 3 Segmentation fault (core dumped) ld.lld -r --whole-archive {input_files} -o {output}
LLD 19.1.0 (compatible with GNU linkers)
Environment Information:
Clang: 19.1.0 (for linking)
GCC: 12.1.0 (for compilation)
I found an open bug related to the handling of relocated sections when executing addOrphanSections
, but the issue does not provide any logs or crash info: #156417. Hence, not sure if it's the same issue.
Metadata
Metadata
Assignees
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]incompleteIssue not complete (e.g. missing a reproducer, build arguments, etc.)Issue not complete (e.g. missing a reproducer, build arguments, etc.)lld:ELF