[llvm-bugs] [Bug 44277] New: LLD segfaults when linking the Aarch64 Linux kernel with ThinLTO
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Dec 11 11:22:51 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=44277
Bug ID: 44277
Summary: LLD segfaults when linking the Aarch64 Linux kernel
with ThinLTO
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: vsk at apple.com
Reporter: samitolvanen at google.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
ndesaulniers at google.com, ruiu at google.com,
tejohnson at google.com
Starting with commit 30038da15b18ac4e34b9ea7a648382ae481e4770 ("[DWARF] Allow
cross-CU references of subprogram definitions"), building the Linux kernel with
ThinLTO and LLD fails with a segmentation fault:
...
LTO vmlinux.o
Stack dump:
0. Running pass 'Function Pass Manager' on module
'arch/arm64/built-in.a(kernel/time.o at 4094)'.
1. Running pass 'AArch64 Assembly Printer' on function '@time_init'
LLVM ERROR: Failed to rename temporary file .thinlto-cache/Thin-d28bbb.tmp.o to
.thinlto-cache/llvmcache-C22016E1D1853F1DBC0C29919ED2F9B7CDF8E084: No such file
or directory
LLVM ERROR: Failed to rename temporary file .thinlto-cache/Thin-d9b995.tmp.o to
.thinlto-cache/llvmcache-BE7211A526D6D732AC88F1C1BCEC23592806F256: No such file
or directory
LLVM ERROR: Failed to rename temporary file .thinlto-cache/Thin-99c344.tmp.o to
.thinlto-cache/llvmcache-C7FECFD0C0C51CF353CF7961D21F44C1A8E02A6A: No such file
or directory
scripts/link-vmlinux.sh: line 71: 100211 Segmentation fault ${LD}
${KBUILD_LDFLAGS} -r -o ${1} $(lto_lds) ${objects}
make: *** [Makefile:1136: vmlinux] Error 139
Steps to reproduce:
$ git clone https://github.com/samitolvanen/linux.git
$ cd linux
$ git checkout clang-lto
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CC=clang LD=ld.lld
defconfig
$ ./scripts/config -e LTO_CLANG -e THINLTO
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CC=clang LD=ld.lld -j110
I've confirmed that reverting commit 30038da15b18ac4e34b9ea7a648382ae481e4770
fixes the issue.
Note that not passing --thinlto-cache-dir to LLD removes the "Failed to rename
temporary file" errors, but still results in a segfault.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191211/0bcfe393/attachment.html>
More information about the llvm-bugs
mailing list