bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12762] LTO on Windows is broken (C++)


From: vanboxem.ruben at gmail dot com
Subject: [Bug ld/12762] LTO on Windows is broken (C++)
Date: Sun, 23 Sep 2012 20:33:53 +0000


http://sourceware.org/bugzilla/show_bug.cgi?id=12762



--- Comment #30 from vanboxem.ruben at gmail dot com 2012-09-23 20:33:53 UTC ---

The original problem has shifted somewhat. Using GCC 4.7.2 and ld

2.23.51.20120920, the first link error I get now when compiling Qt (where I

originally met the issue) with -flto (and of course linking with the same

option) is the following:





g++ -Wl,-s -mthreads -flto -shared

-Wl,--out-implib,d:\Development\x64\Qt\lib\libQtXml4.a -o ..\..\lib\QtXml4.dll

tmp/obj/release_shared/qdom.o tmp/obj/release_shared/qxml.o

tmp/obj/release_shared/qxmlstream.o  -L"d:\Development\x64\Qt\lib"

-L"d:\Development\x64\Qt\lib" tmp\obj\release_shared\QtXml_resource_res.o

-lQtCore4

R:\ccPQQQpC.ltrans23.ltrans.o:ccPQQQpC.ltrans23.o:(.text+0x1d05): undefined

reference to `__imp__ZTV12QTextOStream.local.415.4022'

R:\ccPQQQpC.ltrans23.ltrans.o:ccPQQQpC.ltrans23.o:(.text+0x1d43): undefined

reference to `__imp__ZTV12QTextOStream.local.415.4022'

R:\ccPQQQpC.ltrans23.ltrans.o:ccPQQQpC.ltrans23.o:(.text+0x1d81): undefined

reference to `__imp__ZTV12QTextIStream.local.414.4003'

R:\ccPQQQpC.ltrans23.ltrans.o:ccPQQQpC.ltrans23.o:(.text+0x1dbf): undefined

reference to `__imp__ZTV12QTextIStream.local.414.4003'

d:/development/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe:

R:\ccPQQQpC.ltrans23.ltrans.o: bad reloc address 0x8 in section `.data'

collect2.exe: error: ld returned 1 exit status

mingw32-make[2]: *** [..\..\lib\QtXml4.dll] Error 1

mingw32-make[2]: Leaving directory `D:/Development/x64/Qt/src/xml'



Which means that a bunch of libraries now build, and the Qt build utilities

that I believe could not be built are now built fine.

The above symbol(s) ran through C++filt say: "vtable for QTextOStream".



Another small C++ project consisting of a static library and an app compiles

without a hitch with -flto (and it works fine too)



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

------- You are receiving this mail because: -------

You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]