This testcase (yes, it's actually huge): #include <iostream>
int main () { std::cerr << "writing to cerr" << std::endl; } segfaults in libstdc++ when powerpc-linux mainline GCC is configured with --enable-secureplt and uses 2.16 binutils (specifically, I used 2.16.91.0.5 20051219 (SUSE Linux)). It works fine with 2.18 binutils or without --enable-secureplt. The failure begins with this patch: http://gcc.gnu.org/viewcvs?view=rev&rev=135961 r135961 | zadeck | 2008-05-26 23:37:05 +0000 (Mon, 26 May 2008) | 14 lines 2008-05-26 Steven Bosscher <[EMAIL PROTECTED]> * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Generate new tls_gd_* and tls_ld_* insns instead of an insn sequence. * config/rs6000/rs6000.md (TLSmode, tls_abi_suffix, tls_insn_suffix, tls_sysv_suffix): New mode and mode attribute iterators. (tls_gd_32, tls_gd_64, tls_ld_32, tls_ld_64): Remove. (lts_gd_aix*, tls_gd_sysv*, tls_ld_aix*, tls_ld_sysv*): New patterns. (tls_dtprel_*, tls_dtprel_ha_*, tls_dtprel_lo_*, tls_got_dtprel_*, tls_tprel_*, tls_tprel_ha_*, tls_tprel_lo_*, tls_got_tprel_*, tls_tls_*): Merge 32 bit and 64 bit variants using aforementioned iterators. -- Summary: TLS LIBCALL change breaks libstdc++ built with older binutils Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janis at gcc dot gnu dot org GCC target triplet: powerpc-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36955