The __gnu_cxx::stdio_sync_filebuf<char> constructor are not listed in gnu.ver, so aren't provided by libstdc++.so. The following test doesn't link with -O0 or -O1, although it does with -O2, "-O0 -static" and "-O1 -static".
------------------------------------------------------------- #include <cstdio> #include <ext/stdio_sync_filebuf.h> __gnu_cxx::stdio_sync_filebuf<char> foo (stdin); int main () {} ------------------------------------------------------------- -- Summary: __gnu_cxx::stdio_sync_filebuf<char> constructor isn't exported by the DSO Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: link-failure Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rsandifo at gcc dot gnu dot org GCC build triplet: x86_64-linux-gnu GCC host triplet: x86_64-linux-gnu GCC target triplet: x86_64-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35209