From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AC0BD3858C54; Tue, 28 Mar 2023 14:01:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC0BD3858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680012065; bh=DOVmJSUlr6UtV6vm6TX8HTB7dV+9R0558WxIk3aANMk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oRk3xF/9U1/l+g0vHLgl5zjoo/zQ2r6S/BstUN+U45qmvZ9ytm2gigh29m3il2yze bb7mx8wMJzqZpHz8gEDeF7W9wxe+f7dU7/tKItADPUFtO8g5GsK6Mchh4c5mirdWp3 pXuj1DVyxD+tCvIY9qYn0Q5LrM8QvG5PJm7ltxQc= From: "nickc at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug win32/18027] dwarf2 debug info after rebasing DLLs unusable Date: Tue, 28 Mar 2023 14:01:04 +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: nickc at redhat dot com 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: 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 --- Comment #21 from Nick Clifton --- (In reply to Corinna Vinschen from comment #20) Hi Corinna, > > In fact it may even be possible to create the section and its contents = using > > the default linker script, so that there is no need to change the linke= r 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 tried > this with the Cygwin DLL which provides its own linker script, and I came= up > with: >=20 > .debug_pe_defaddr ALIGN(__section_alignment__) (NOLOAD) : > { > QUAD (__image_base__) > } >=20 > which appears to work. Excellent. Do you want me to add that to the default linker scripts for PE= and PEP format targets ? Of course this will only help if the user then builds with a linker contain= ing 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, just a modified bu= ild process. > > PPS. Would the __pei386_runtime_relocator symbol be of any use in addre= ssing > > this problem ? >=20 > I have no idea. How so? It was just a guess. I thought that the name of the symbol meant that it w= ould contain an address bias of some sort. Something that might be able to help= fix the addresses in the DWARF debug information. Cheers Nick --=20 You are receiving this mail because: You are on the CC list for the bug.=