https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119029
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- The <iostream> header has: // For construction of filebuffers for cout, cin, cerr, clog et. al. // When the init_priority attribute is usable, we do this initialization // in the compiled library instead (src/c++98/globals_io.cc). #if !(_GLIBCXX_USE_INIT_PRIORITY_ATTRIBUTE \ && __has_attribute(__init_priority__)) static ios_base::Init __ioinit; #elif defined(_GLIBCXX_SYMVER_GNU) && defined(__ELF__) __extension__ __asm (".globl _ZSt21ios_base_library_initv"); #endif and then src/c++98/ios_init.cc has: #if defined(_GLIBCXX_SYMVER_GNU) && defined(__ELF__) #pragma GCC diagnostic ignored "-Wattribute-alias" void ios_base_library_init (void) __attribute__((alias ("_ZNSt8ios_base4InitC1Ev"))); #endif So that's why we define that symbol. Maybe we just want to define that for _GLIBCXX_SYMVER_SUN too?