From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7F1F23858408; Tue, 28 Mar 2023 18:10:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F1F23858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680027052; bh=XG3wEy8qPElScmw/UFoQbxeihsI0vuKYaJvjAuH/HA4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PganDdrtVoNjt6Hbe+T5dFvdIz/MDWnEf/l19fZWLU9S09hCcNn5e0ZIqr8GyOOqN MefD68zi/5bxktRDZuROH+SAvRUeyOrY/3axprJqE5hoFfto5oY7Q/eRB9ZIvhYiCS 4Ze07UuLnTzqUx71npBPb3MCfJkXdoPH3Lt68cVE= From: "corinna at vinschen dot de" To: gdb-prs@sourceware.org Subject: [Bug win32/18027] dwarf2 debug info after rebasing DLLs unusable Date: Tue, 28 Mar 2023 18:10:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: win32 X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: corinna at vinschen dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D18027 Corinna Vinschen changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jon.turney at dronecode do= t org.uk | |, Stromeko at nexgo dot de --- Comment #22 from Corinna Vinschen --- [adding Jon and Achim, our GDB and binutils maintainers] Hi Nick, (In reply to Nick Clifton from comment #21) > (In reply to Corinna Vinschen from comment #20) > Hi Corinna, >=20 > > > In fact it may even be possible to create the section and its content= s using > > > the default linker script, so that there is no need to change the lin= ker at all. > > > For example adding (untested): > > >=20 > > > .debug_pe_defaddr 0 { .long DLLMain } > >=20 > > Aha, nice. That should ideally be the load address of the DLL, so I tri= ed > > this with the Cygwin DLL which provides its own linker script, and I ca= me up > > with: > >=20 > > .debug_pe_defaddr ALIGN(__section_alignment__) (NOLOAD) : > > { > > QUAD (__image_base__) > > } > >=20 > > which appears to work. >=20 > Excellent. Do you want me to add that to the default linker scripts for = PE > and PEP format targets ? Well... I guess this only makese sense on Cygwin. I'm not sure if anybody outside of Cygwin actually still rebases DLLs, given the default is ASLR these days... Tom? If the original image base is represented in binary form as above, is that ok for GDB's offset calculation? > Of course this will only help if the user then builds with a linker > containing this extra text in its default linker script. But you can also > provide that script fragment as an extra input file to any version of the > linker, and it should work. So you would not need a new linker at all, j= ust > a modified build process. Yeah, it would be great if the info would be created automatically by binutils ld scripts. In the meantime we could add this to the release version 2.40. Take care, Corinna --=20 You are receiving this mail because: You are on the CC list for the bug.=