<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - "Not enough space" when linking with whole-archive"
href="https://bugs.llvm.org/show_bug.cgi?id=42388">42388</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>"Not enough space" when linking with whole-archive
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows XP
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>COFF
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>orgads@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>A very similar compilation with slightly less objects, and without lib1.a,
which needs --whole-archive, links and runs well.
g++ -fuse-ld=lld -v -m32 -Wl,-subsystem,console -mthreads -o test.exe
@object_script.test -Wl,--whole-archive lib1.a -Wl,-no-whole-archive lib2.a
lib3.a lib4.a lib5.a lib6.a -lws2_32 -lgdi32 -luser32 -ldbghelp -liphlpapi
-lshlwapi -lole32 -loleaut32 -lboost_system-mt-x32 -lboost_filesystem-mt-x32
-lbfd -liberty -lz -lpthread
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../gcc-9.1.0/configure --prefix=/mingw32
--with-local-prefix=/mingw32/local --build=i686-w64-mingw32
--host=i686-w64-mingw32 --target=i686-w64-mingw32
--with-native-system-header-dir=/mingw32/i686-w64-mingw32/include
--libexecdir=/mingw32/lib --enable-bootstrap --with-arch=i686
--with-tune=generic --enable-languages=c,lto,c++,fortran --enable-shared
--enable-static --enable-libatomic --enable-threads=posix --enable-graphite
--enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts=yes
--enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug
--disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib
--enable-checking=release --disable-rpath --disable-win32-registry
--disable-nls --disable-werror --disable-symvers --enable-plugin
--with-libiconv --with-system-zlib --with-gmp=/mingw32 --with-mpfr=/mingw32
--with-mpc=/mingw32 --with-isl=/mingw32 --with-pkgversion='Rev1, Built by MSYS2
project' --with-bugurl=<a href="https://sourceforge.net/projects/msys2">https://sourceforge.net/projects/msys2</a> --with-gnu-as
--with-gnu-ld --disable-sjlj-exceptions --with-dwarf2
Thread model: posix
gcc version 9.1.0 (Rev1, Built by MSYS2 project)
COMPILER_PATH=C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/;C:/Qt/mingw/bin/../lib/gcc/;C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../../../i686-w64-mingw32/bin/
LIBRARY_PATH=C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/;C:/Qt/mingw/bin/../lib/gcc/;C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../../../i686-w64-mingw32/lib/../lib/;C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../../../lib/;C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../../../i686-w64-mingw32/lib/;C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../../
COLLECT_GCC_OPTIONS='-fuse-ld=lld' '-v' '-m32' '-mthreads' '-o' 'test.exe'
'-shared-libgcc' '-mtune=generic' '-march=i686'
C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/collect2.exe -plugin
C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/liblto_plugin-0.dll
-plugin-opt=C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/lto-wrapper.exe
-plugin-opt=-fresolution=C:\Users\orgads\AppData\Local\Temp\ccj9Cazl.res
-plugin-opt=-pass-through=-lmingwthrd -plugin-opt=-pass-through=-lmingw32
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex
-plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread
-plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32
-plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32
-plugin-opt=-pass-through=-lmingwthrd -plugin-opt=-pass-through=-lmingw32
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex
-plugin-opt=-pass-through=-lmsvcrt -m i386pe -Bdynamic -u
___register_frame_info -u ___deregister_frame_info -fuse-ld=lld -o test.exe
C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o
C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/crtbegin.o
-LC:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0
-LC:/Qt/mingw/bin/../lib/gcc
-LC:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../../../i686-w64-mingw32/lib/../lib
-LC:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../../../lib
-LC:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../../../i686-w64-mingw32/lib
-LC:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../..
@C:\Users\orgads\AppData\Local\Temp\ccAgQnTw -lmingwthrd -lmingw32 -lgcc_s
-lgcc -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32
-lkernel32 -lmingwthrd -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt
C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../../../i686-w64-mingw32/lib/../lib/default-manifest.o
C:/Qt/mingw/bin/../lib/gcc/i686-w64-mingw32/9.1.0/crtend.o
lld-link: error: failed to open test.exe: Not enough space
collect2.exe: error: ld returned 1 exit status</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>