http://sourceware.org/bugzilla/show_bug.cgi?id=15056
Bug #: 15056 Summary: gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL Product: binutils Version: 2.23 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassig...@sourceware.org ReportedBy: r...@techfak.uni-bielefeld.de CC: da...@davemloft.net, ebotca...@gcc.gnu.org Classification: Unclassified Host: sparc*-*-solaris2* After upgrading my binutils installation from 2.22 to 2.23.1, many (all?) C++ EH tests on Solaris/SPARC started failing like this: Program received signal SIGILL, Illegal instruction. [Switching to Thread 1 (LWP 1)] 0xff2e4f60 in __CTOR_LIST__ () from ../../../sparc-sun-solaris2.11/libstdc++-v3/src/.libs/libstdc++.so.6 (gdb) where #0 0xff2e4f60 in __CTOR_LIST__ () from ../../../sparc-sun-solaris2.11/libstdc++-v3/src/.libs/libstdc++.so.6 #1 0xff249618 in __cxxabiv1::__cxa_get_globals () at /vol/gcc/src/hg/trunk/local/libstdc++-v3/libsupc++/eh_globals.cc:63 #2 0xff248660 in __cxxabiv1::__cxa_allocate_exception (thrown_size=134464) at /vol/gcc/src/hg/trunk/local/libstdc++-v3/libsupc++/eh_alloc.cc:136 #3 0x000108d4 in h () at /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/eh/alias1.C:25 #4 0x00010918 in main () at /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/eh/alias1.C:34 If I relink libstdc++.so with gld 2.22 (no other changes), the test passes. Looking at the __cxa_get_globals call site with gdb, I find (with gld 2.23.1): => 0xff249610 <__cxxabiv1::__cxa_get_globals()+32>: call 0xff2e4f60 0xff249614 <__cxxabiv1::__cxa_get_globals()+36>: xor %i0, 0, %i0 (gdb) 1: x/i $pc => 0xff249614 <__cxxabiv1::__cxa_get_globals()+36>: xor %i0, 0, %i0 (gdb) 0xff2e4f60 in __CTOR_LIST__ () from ../../../sparc-sun-solaris2.11/libstdc++-v3/src/.libs/save/libstdc++.so.6 1: x/i $pc => 0xff2e4f60: unknown Instead, with libstdc++.so relinked with gld 2.22, I see => 0xff2496a4 <__cxxabiv1::__cxa_get_globals()+32>: call 0xff2e987c <__tls_get_addr@plt> 0xff2496a8 <__cxxabiv1::__cxa_get_globals()+36>: xor %i0, 0, %i0 In the input object (eh_globals.o), elfdump -r shows (mangled and unmangled respectively): R_SPARC_TLS_LDM_CALL 0x20 0 .rela.text.__c _ZZN12_GLOBAL__ N_110get_globalEvE6global R_SPARC_TLS_LDM_CALL 0x20 0 .rela.text.(char) (anonymous n amespace)::get_global()::global I don't yet have an idea what gld change is causing this, but it's a gld 2.23 regression that makes binutils 2.23 unusable on Solaris/SPARC. Rainer -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils