From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0A53C3857C50; Wed, 20 Apr 2022 09:39:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A53C3857C50 From: "rui314 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/91239] gcc generates invalid .debug_macro sections (according to lld folks) Date: Wed, 20 Apr 2022 09:39:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 9.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rui314 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: Wed, 20 Apr 2022 09:39:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D91239 --- Comment #9 from Rui Ueyama --- Thanks Jukub for the description. I'll try to implement it to mold. One question though. Why doesn't gcc create a weak symbol wm4.stdio.h.24.5c1b97eef3c86b7a2549420f69f4f128 at the beginning of each wm4.stdio.h.24.5c1b97eef3c86b7a2549420f69f4f128 section and always use that symbol instead of referring the beginning of the section using the section symbol? The ELF spec says that no one should refer any comdat members direc= tly and instead refer them via symbols, so the current GCC's behavior violates = the spec if I understand it correctly.=