This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/56557] [4.8 Regression] Link error about `std::fstream' or `std::stringstream' with `-flto' and `-rdynamic' options
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Mar 2013 12:53:17 +0000
- Subject: [Bug lto/56557] [4.8 Regression] Link error about `std::fstream' or `std::stringstream' with `-flto' and `-rdynamic' options
- Auto-submitted: auto-generated
- References: <bug-56557-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56557
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|libstdc++ |lto
--- Comment #14 from Jan Hubicka <hubicka at gcc dot gnu.org> 2013-03-12 12:53:17 UTC ---
This is the LTO symbol table I get out of the testcase now:
U _ZNSdC2Ev
U _ZNSdD1Ev
U _ZNSdD2Ev
U _ZNSiC2Ev
U _ZNSiD1Ev
U _ZNSiD2Ev
U _ZNSoC2Ev
U _ZNSoD1Ev
U _ZNSoD2Ev
U _ZNSt12__basic_fileIcED1Ev
U _ZNSt13basic_filebufIcSt11char_traitsIcEE5closeEv
U _ZNSt13basic_filebufIcSt11char_traitsIcEEC1Ev
U _ZNSt13basic_filebufIcSt11char_traitsIcEED1Ev
U _ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev
U _ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev
U _ZNSt15basic_streambufIcSt11char_traitsIcEED1Ev
U _ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev
U _ZNSt6localeD1Ev
U _ZNSt8ios_baseC2Ev
U _ZNSt8ios_baseD2Ev
U _ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E
U _ZNSt9basic_iosIcSt11char_traitsIcEEC2Ev
U _ZNSt9basic_iosIcSt11char_traitsIcEED1Ev
U _ZNSt9basic_iosIcSt11char_traitsIcEED2Ev
U _ZTTSd
U _ZTTSt13basic_fstreamIcSt11char_traitsIcEE
U _ZTVSd
U _ZTVSi
U _ZTVSo
U _ZTVSt13basic_filebufIcSt11char_traitsIcEE
U _ZTVSt13basic_fstreamIcSt11char_traitsIcEE
U _ZTVSt15basic_streambufIcSt11char_traitsIcEE
U _ZTVSt9basic_iosIcSt11char_traitsIcEE
U _ZdlPv
U __gxx_personality_v0
00000000 T main
So still quite a bit more than w/o LTO:
U _ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev
U _ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev
0000000000000001 C __gnu_lto_v1
0000000000000000 T main
but the construction vtable is no longer on the list. Those extra symbols are
from virtual functions we hold for possible devirtualization.
We ought to make sure that linkers optimize out the dynamic table entries after
we are done with optimizing them out