From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id E78023857C60; Fri, 27 Aug 2021 12:34:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E78023857C60 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: loader script: add DWARF 5 sections X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: 88c0276358687b2790f6970674b09ff40d47cd06 X-Git-Newrev: 801120c1f402f9b0f72b5a231bf9e1cf82614cac Message-Id: <20210827123406.E78023857C60@sourceware.org> Date: Fri, 27 Aug 2021 12:34:06 +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: Fri, 27 Aug 2021 12:34:07 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=801120c1f402f9b0f72b5a231bf9e1cf82614cac commit 801120c1f402f9b0f72b5a231bf9e1cf82614cac Author: Corinna Vinschen Date: Fri Aug 27 14:26:42 2021 +0200 Cygwin: loader script: add DWARF 5 sections Modern gcc's generate additional DWARF 5 debug sections, which were still missing in our Cygwin loader script. With ld from binutils 2.37, this results in diagnostic output when linking the Cygwin DLL... ld: cygwin0.dll:/4: section below image base ld: cygwin0.dll:/20: section below image base ld: cygwin0.dll:/36: section below image base ...and the section addresses given to these sections (.debug_loclists, .debug_rnglists, debug_line_str) will be wrong. Fix this by adding the missing DWARF 5 sections to our linker script template cygwin.sc.in. Add a comment in terms of the deprecated DWARF 4 section .debug_types. Signed-off-by: Corinna Vinschen Signed-off-by: Jon Turney Diff: --- winsup/cygwin/cygwin.sc.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/cygwin.sc.in b/winsup/cygwin/cygwin.sc.in index 134ae3f76..293d2ab25 100644 --- a/winsup/cygwin/cygwin.sc.in +++ b/winsup/cygwin/cygwin.sc.in @@ -178,8 +178,13 @@ SECTIONS .debug_typenames ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_typenames) } .debug_varnames ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_varnames) } .debug_macro ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_macro) } - /* DWARF 3. */ + /* DWARF 3 */ .debug_ranges ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_ranges) } - /* DWARF 4. */ + /* DWARF 4, merged back into .debug_info with DWARF 5 */ .debug_types ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_types .gnu.linkonce.wt.*) } + /* DWARF 5 */ + .debug_loclists ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_loclists) } + .debug_rnglists ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_rnglists) } + .debug_line_str ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_line_str) } + }