https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64900
--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- > --- Comment #1 from Ian Lance Taylor <ian at airs dot com> --- > Normally libgo.so will get the symbol _Unwind_GetLanguageSpecificData from > libgcc_s.so. The first step here is to find out why that didn't happen. Was > libgo.so not linked against libgcc_s.so? Does libgcc_s.so not define It wasn't: it turns out that Solaris 11/SPARC and x86 differ in their libgcc spec (sparc vs. x86): *libgcc: -%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!s hared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s -lgcc}}%{shared:%{shared-lib gcc:-lgcc_s}%{!shared-libgcc:-lgcc}}}} +%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libg cc:-lgcc --as-needed -lgcc_s --no-as-needed}%{shared-libgcc:-lgcc_s%{!shared: -l gcc}}}} On x86, --as-needed support in gld was disabled due to binutils PR ld/12320 (cf. gcc/configure.ac), thus libgcc_s is only linked with -shared when explicitly specifying -shared-libgcc. > _Unwind_GetLanguageSpecificData? It does. The following patch allowed me to correctly link libgo.so with libgcc_s.so, and as expected, gotools also link without problems: diff --git a/libgo/Makefile.am b/libgo/Makefile.am --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -1991,7 +1991,8 @@ libgo_go_objs = \ unicode/utf8.lo libgo_ldflags = \ - -version-info $(libtool_VERSION) $(PTHREAD_CFLAGS) $(AM_LDFLAGS) + -version-info $(libtool_VERSION) -Wc,-shared-libgcc \ + $(PTHREAD_CFLAGS) $(AM_LDFLAGS) libgo_libadd = \ $(libgo_go_objs) ../libbacktrace/libbacktrace.la \ Rainer