[llvm-bugs] [Bug 42388] New: "Not enough space" when linking with whole-archive

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 25 12:25:34 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42388

            Bug ID: 42388
           Summary: "Not enough space" when linking with whole-archive
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: COFF
          Assignee: unassignedbugs at nondot.org
          Reporter: orgads at gmail.com
                CC: llvm-bugs at lists.llvm.org

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=https://sourceforge.net/projects/msys2 --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

-- 
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/20190625/cf04960f/attachment.html>


More information about the llvm-bugs mailing list