From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF8823951C10; Mon, 16 Nov 2020 12:30:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF8823951C10 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/97787] [10/11 regression] 64bit mips lto: .symtab local symbol at index x (>= sh_info of y) Date: Mon, 16 Nov 2020 12:30:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse 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: Mon, 16 Nov 2020 12:30:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97787 --- Comment #8 from rguenther at suse dot de --- On Fri, 13 Nov 2020, bunk at stusta dot de wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97787 >=20 > --- Comment #7 from Adrian Bunk --- > (In reply to Richard Biener from comment #6) > > I see. Still GCC or GAS produces a bogus object file (the original lin= ker > > error). It might be the new problem is an entirely different one? It = looks > > more and more like a target problem to me. >=20 > My guess would be that the situations where -mxgot is required on 64bit M= IPS > are not (no longer?) handled properly with LTO. >=20 > Note that when compiling from precompiled sources the linker also exits w= ith an > error, the main difference in that case is that the correct "relocation > truncated to fit" error message is not output in the LTO case. >=20 > More worrisome is that adding -mxgot to compiler and linker flags did not= fix > it in the LTO case. I guess it is because -mxgot is supposed to be handled by the assembler? I see %{mgp32} %{mgp64} %{march=3D*} %{mxgot:-xgot} \ in ASM_SPEC. I guess this doesn't make it to COLLECT_AS_OPTIONS and eventually makes it dropped from COLLECT_GCC_OPTIONS as well. Can you attach the full output of compiling & linking with -v added? Can you try using -mxgot -Wa,-xgot or -mxgot -Xassembler -xgot at compile time?=