https://sourceware.org/bugzilla/show_bug.cgi?id=31998
Bug ID: 31998 Summary: Linking with -fpic on sparc64 fails with: relocation truncated to fit: R_SPARC_GOT13 Product: binutils Version: 2.42 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: matoro_bugzilla_glibc at matoro dot tk Target Milestone: --- Host: sparc64-unknown-linux-gnu Target: sparc64-unknown-linux-gnu Build: sparc64-unknown-linux-gnu Created attachment 15637 --> https://sourceware.org/bugzilla/attachment.cgi?id=15637&action=edit cpp11_variadic_templates_wrap.ii This is identified by our downstream bug: https://bugs.gentoo.org/900769 We are trying to run the tests for swig, however they fail due to many of the large C++ sources they generate triggering this bug. I took one of the sample files and ran it through cvise to minimize it, resulting in the attached ~44kb source which demonstrates the problem. The problem reproduces both when compiling using gcc-13.2.1 and gcc-14.1.1. binutils-2.42 was used for both tests. Removing the -fpic argument eliminates the problem. $ sparc64-unknown-linux-gnu-g++ -fpic -shared -x c++ -o /dev/null cpp11_variadic_templates_wrap.ii -w /tmp/cc0FfoHu.o: in function `_wrap_VariadicParms3_ParmsFuncPtrPtrRValueRef()': cpp11_variadic_templates_wrap.ii:(.text+0x1bb4): relocation truncated to fit: R_SPARC_GOT13 against undefined symbol `vtable for C' /tmp/cc0FfoHu.o: in function `__static_initialization_and_destruction_0()': cpp11_variadic_templates_wrap.ii:(.text+0x2360): relocation truncated to fit: R_SPARC_GOT13 against symbol `_wrap_VariadicParms2_ParmsVal_argp2' defined in .data.rel section in /tmp/cc0FfoHu.o collect2: error: ld returned 1 exit status -- You are receiving this mail because: You are on the CC list for the bug.