From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8EAC33896804; Thu, 12 Nov 2020 18:52:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8EAC33896804 From: "bunk at stusta dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/97787] [10/11 regression] 64bit mips lto: .symtab local symbol at index x (>= sh_info of y) Date: Thu, 12 Nov 2020 18:52:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: bunk at stusta dot de X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2020 18:52:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97787 --- Comment #5 from Adrian Bunk --- (In reply to Richard Biener from comment #4) > You can also try to 'reduce' the testcase. Since you are linking a shared > object you can try to strip as many linker inputs as possible and then > reduce the source files. Bisecting does not work when both halves are working, but I now found some clues: $ g++ -flto -shared CMakeFiles/cpp.dir/src/dolfin.cpp.o CMakeFiles/cpp.dir/src/parameter.cpp.o CMakeFiles/cpp.dir/src/adaptivity.cp= p.o CMakeFiles/cpp.dir/src/ale.cpp.o CMakeFiles/cpp.dir/src/common.cpp.o CMakeFiles/cpp.dir/src/fem.cpp.o CMakeFiles/cpp.dir/src/function.cpp.o CMakeFiles/cpp.dir/src/generation.cpp.o CMakeFiles/cpp.dir/src/geometry.cpp= .o CMakeFiles/cpp.dir/src/graph.cpp.o CMakeFiles/cpp.dir/src/log.cpp.o CMakeFiles/cpp.dir/src/math.cpp.o CMakeFiles/cpp.dir/src/mesh.cpp.o CMakeFiles/cpp.dir/src/multistage.cpp.o CMakeFiles/cpp.dir/src/ts.cpp.o CMakeFiles/cpp.dir/src/io.cpp.o CMakeFiles/cpp.dir/src/la.cpp.o CMakeFiles/cpp.dir/src/nls.cpp.o CMakeFiles/cpp.dir/src/refinement.cpp.o CMakeFiles/cpp.dir/src/MPICommWrapper.cpp.o /usr/bin/ld: /tmp/ccofV1SZ.ltrans32.ltrans.o: .symtab local symbol at index= 214 (>=3D sh_info of 34) /usr/bin/ld: /tmp/ccofV1SZ.ltrans32.ltrans.o: error adding symbols: bad val= ue collect2: error: ld returned 1 exit status $ g++ -flto -shared dolfin.ii parameter.ii adaptivity.ii ale.ii common.ii fem.ii function.ii generation.ii geometry.ii graph.ii log.ii math.ii mesh.ii multistage.ii ts.ii io.ii la.ii nls.ii refinement.ii MPICommWrapper.ii /tmp/ccraiNyo.ltrans9.ltrans.o: in function `std::__exception_ptr::exception_ptr::operator=3D(std::__exception_ptr::exc= eption_ptr&&)': :(.text+0x290): relocation truncated to fit: R_MIPS_CALL16 agai= nst `std::__exception_ptr::exception_ptr::~exception_ptr()@@CXXABI_1.3.3' /tmp/ccraiNyo.ltrans9.ltrans.o: in function `std::__cxx11::to_string(int)': :(.text+0x414): relocation truncated to fit: R_MIPS_CALL16 agai= nst `std::__cxx11::basic_string, std::allocator >::basic_string(unsigned long, char, std::allocator const&)@@GLIBCXX_3.4.21' :(.text+0x42c): relocation truncated to fit: R_MIPS_CALL16 agai= nst `std::allocator::~allocator()@@GLIBCXX_3.4' :(.text+0x498): relocation truncated to fit: R_MIPS_CALL16 agai= nst `std::allocator::~allocator()@@GLIBCXX_3.4' :(.text+0x4b0): relocation truncated to fit: R_MIPS_CALL16 agai= nst `_Unwind_Resume@@GCC_3.0' :(.text+0x4e0): relocation truncated to fit: R_MIPS_CALL16 agai= nst `_Unwind_Resume@@GCC_3.0' /tmp/ccraiNyo.ltrans9.ltrans.o: in function `std::__cxx11::to_string(unsign= ed long)': :(.text+0x584): relocation truncated to fit: R_MIPS_CALL16 agai= nst `std::__cxx11::basic_string, std::allocator >::basic_string(unsigned long, char, std::allocator const&)@@GLIBCXX_3.4.21' :(.text+0x598): relocation truncated to fit: R_MIPS_CALL16 agai= nst `std::allocator::~allocator()@@GLIBCXX_3.4' :(.text+0x5c8): relocation truncated to fit: R_MIPS_CALL16 agai= nst `std::__cxx11::basic_string, std::allocator >::size() const@@GLIBCXX_3.4.21' :(.text+0x610): relocation truncated to fit: R_MIPS_CALL16 agai= nst `std::allocator::~allocator()@@GLIBCXX_3.4' :(.text+0x628): additional relocation overflows omitted from the output collect2: error: ld returned 1 exit status $ g++ -flto -shared dolfin.ii parameter.ii adaptivity.ii ale.ii common.ii fem.ii function.ii generation.ii geometry.ii graph.ii log.ii math.ii mesh.ii multistage.ii ts.ii io.ii la.ii nls.ii refinement.ii MPICommWrapper.ii -mxg= ot $ g++ -flto -shared CMakeFiles/cpp.dir/src/dolfin.cpp.o CMakeFiles/cpp.dir/src/parameter.cpp.o CMakeFiles/cpp.dir/src/adaptivity.cp= p.o CMakeFiles/cpp.dir/src/ale.cpp.o CMakeFiles/cpp.dir/src/common.cpp.o CMakeFiles/cpp.dir/src/fem.cpp.o CMakeFiles/cpp.dir/src/function.cpp.o CMakeFiles/cpp.dir/src/generation.cpp.o CMakeFiles/cpp.dir/src/geometry.cpp= .o CMakeFiles/cpp.dir/src/graph.cpp.o CMakeFiles/cpp.dir/src/log.cpp.o CMakeFiles/cpp.dir/src/math.cpp.o CMakeFiles/cpp.dir/src/mesh.cpp.o CMakeFiles/cpp.dir/src/multistage.cpp.o CMakeFiles/cpp.dir/src/ts.cpp.o CMakeFiles/cpp.dir/src/io.cpp.o CMakeFiles/cpp.dir/src/la.cpp.o CMakeFiles/cpp.dir/src/nls.cpp.o CMakeFiles/cpp.dir/src/refinement.cpp.o CMakeFiles/cpp.dir/src/MPICommWrapper.cpp.o -flto-partition=3Dnone $=20 Adding -mxgot to compiler and linker flags of a normal LTO build does not w= ork, but -flto-partition=3Dnone during linking is a workaround.=