https://bugs.llvm.org/show_bug.cgi?id=45289
Bug ID: 45289
Summary: LLD fails to link LTO builds with in-memory ELF
objects larger than 4 GiB
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: ELF
Assignee: unassignedb...@nondot.org
Reporter: ori...@gmx.fr
CC: llvm-bugs@lists.llvm.org, smithp...@googlemail.com
Created attachment 23275
--> https://bugs.llvm.org/attachment.cgi?id=23275&action=edit
Support large intermediate in-memory ELF object
LLD allocates memory for the intermediate native ELF objects in SmallVector
[1], and SmallVector aborts when it grows beyond 4 GiB [2].
The attached simple patch fixes this issue. If it looks reasonable I can send
it for review.
(For the record, the binary in question takes 1.5 hours and 80 GB of RAM to
link with full LTO and becomes 2.5 GB large including debug info.)
[1] https://github.com/llvm/llvm-project/blob/bfa9ce1cb/lld/ELF/LTO.cpp#L264
[2]
https://github.com/llvm/llvm-project/blob/bfa9ce1cb/llvm/lib/Support/SmallVector.cpp#L45
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs