http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53604
Bug #: 53604 Summary: ld reports errors using lto after upgrading from gcc-4.6.2 to gcc-4.7.0 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassig...@gcc.gnu.org ReportedBy: paul.scr...@ghco.co.uk I recently tried to upgrade from gcc-4.6.2 to gcc-4.7.0. I have been using the lto with gcc-4.6.2 and binutils-2.22 for a while with no problems. However, since I upgraded to gcc-4.7.0 ld is getting "hidden symbol isn't defined" errors, something like this when I try to link with my static libraries and a boost shared object: $ /opt/gcc-4.7.0/bin/g++ -o /home/pauls/repos/build/bin/my_app -static-libstdc++ -m64 -march=corei7 -Wl,-rpath,/opt/boost-1.44/lib -L/opt/boost-1.44/lib -flto -O3 -fuse-linker-plugin -L/home/pauls/repos/build/lib /home/pauls/repos/build/obj/my_app.o -lmy_lib -lboost_regex -ldl -lrt `_ZThn16_N5boost16exception_detail10clone_implINS0_19error_info_injectorISt11logic_errorEEED1Ev' referenced in section `.data.rel.ro' of /tmp/cc0n7i0I.ltrans12.ltrans.o: defined in discarded section `.gnu.linkonce.t._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt11logic_errorEEED5Ev' of /home/pauls/repos/build/obj/my_app.o (symbol from plugin) /opt/gcc-4.7.0/lib/gcc/x86_64-fedora-linux/4.7.0/../../../../x86_64-fedora-linux/bin/ld: /home/pauls/repos/build/bin/my_app: hidden symbol `.LTHUNK11.6239' isn't defined binutils 2.22 was pre-installed into: $ /opt/gcc-4.7.0 gcc4.7.0 was build with: $ export PATH=/opt/gcc-4.7.0/bin/:$PATH $ ../configure --prefix=/opt/gcc-4.7.0 --build=x86_64-fedora-linux --with-system-zlib --enable-plugin --enable-bootstrap --enable-shared --enable-threads=posix --enable-languages=c,c++ --disable-checking --disable-libunwind-exceptions I tried upgrading to binutils-2.22.52 to see if was an issue with ld that had recently been patched, but I got the same error. I also tried upgrading from boost-1.44 to boost-1.49 to see if it was an issue with boost exception code, but I also got the same error. Thanks, Paul