[Bug libstdc++/60348] -static-libstdc++ broken
nachms+gcc at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Feb 27 11:02:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60348
--- Comment #2 from Nach <nachms+gcc at gmail dot com> ---
(In reply to Richard Biener from comment #1)
> It works for me. What does ldd test show? Do you have the static
> libstdc++/libgcc installed (Debian may package those separately?)
ldd test
linux-gate.so.1 (0xf76ff000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7676000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf765a000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf74e7000)
/lib/ld-linux.so.2 (0xf7700000)
Recompiling with -static-libgcc added gives:
0000000000690bc0 u DO .bss 0000000000000020 Base
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep20_S_empty_rep_storageE
0000000000690c00 u DO .bss 0000000000000020 Base
_ZNSs4_Rep20_S_empty_rep_storageE
And ldd:
linux-vdso.so.1 (0x00007ffff011e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fecae56b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fecae1c2000)
/lib64/ld-linux-x86-64.so.2 (0x00007fecae8b1000)
I also want to confirm that I indeed have the static libstdc++ and libgcc
installed. Furthermore, I've compiled huge C++ projects which use at least a
dozen std::string methods, iostream, a ton of STL, and these are the only two
symbols that are missing when using -static-libstdc++.
Without -static-libstdc++, a lot of other libstdc++ symbols are now present in
objdump, for example:
0000000000000000 DF *UND* 0000000000000000 GLIBCXX_3.4
_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
More information about the Gcc-bugs
mailing list