From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 8A06B3858018; Mon, 15 Nov 2021 12:49:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A06B3858018 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: dllfixdbg: create .gnu_debuglink section in the right spot X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: df5de02e0ebc8627683bc50aeb68d0d2b0806f09 X-Git-Newrev: 98d10e5fd2868d0d9ec9117f832a63f8ae75d75b Message-Id: <20211115124907.8A06B3858018@sourceware.org> Date: Mon, 15 Nov 2021 12:49:07 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2021 12:49:07 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=98d10e5fd2868d0d9ec9117f832a63f8ae75d75b commit 98d10e5fd2868d0d9ec9117f832a63f8ae75d75b Author: Corinna Vinschen Date: Mon Nov 15 13:32:03 2021 +0100 Cygwin: dllfixdbg: create .gnu_debuglink section in the right spot A recent change in binutils marks the .gnu_debuglink_overlay section as debug section. When dllfixdbg calls objcopy -g, the section is removed and the --add-gnu-debuglink option on the same command line appends the section consequentially at the end of the sections. This in turn breaks Windows Version info and, potentially, raising the cygheap size at runtime. Fix this by adding an explicit --keep-section=.gnu_debuglink_overlay to the objcopy command line. Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/dllfixdbg | 2 +- winsup/cygwin/release/3.3.3 | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/dllfixdbg b/winsup/cygwin/dllfixdbg index 70a496584..a2f1210fd 100755 --- a/winsup/cygwin/dllfixdbg +++ b/winsup/cygwin/dllfixdbg @@ -16,7 +16,7 @@ my @objcopy = ((shift)); my $dll = shift; my $dbg = shift; xit 0, @objcopy, '-R', '.gnu_debuglink_overlay', '--add-gnu-debuglink=/dev/null', '--only-keep-debug', $dll, $dbg; -xit 0, @objcopy, '-g', '--add-gnu-debuglink=' . $dbg, $dll; +xit 0, @objcopy, '-g', '--keep-section=.gnu_debuglink_overlay', '--add-gnu-debuglink=' . $dbg, $dll; open(OBJDUMP, '-|', "$objdump --headers $dll"); my %section; while () { diff --git a/winsup/cygwin/release/3.3.3 b/winsup/cygwin/release/3.3.3 index d04265181..2ad28d465 100644 --- a/winsup/cygwin/release/3.3.3 +++ b/winsup/cygwin/release/3.3.3 @@ -9,3 +9,6 @@ Bug Fixes fstatat and other ...at calls. "X:/" still is handled as absolute path. Addresses: https://cygwin.com/pipermail/cygwin/2021-November/249837.html + +- Fix showing DLL version info from native Windows tools. + Addresses: https://cygwin.com/pipermail/cygwin/2021-November/249867.html