[Bug binutils/28992] New: strip strips .gnu_debuglink
https://sourceware.org/bugzilla/show_bug.cgi?id=28992 Bug ID: 28992 Summary: strip strips .gnu_debuglink Product: binutils Version: 2.37 Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: cristian.adam at gmail dot com Target Milestone: --- We noticed with a MinGW 11.2.0 package that binutils 2.37's strip removes the ".gnu_debuglink" section from binaries. This was not the case with MinGW 8.1.0 and binutils 2.30. The removal of the ".gnu_debuglink" section results in gdb not loading the separate debug binaries. See how Qt is affected at https://bugreports.qt.io/browse/QTBUG-101653 The workaround is to use a script that adds "--keep-section=.gnu_debuglink". -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/28992] strip strips .gnu_debuglink
https://sourceware.org/bugzilla/show_bug.cgi?id=28992 --- Comment #2 from Cristian Adam --- Here is a run with strip from MinGW 11.2.0: c:\Projects\Qt\build-mingw-qtbase\bin $ strip --version GNU strip (GNU Binutils) 2.37 Copyright (C) 2021 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. c:\Projects\Qt\build-mingw-qtbase\bin $ objdump -x Qt6Core.dll | findstr .gnu_debuglink 13 .gnu_debuglink 0014 000264537000 000264537000 005fca00 2**2 c:\Projects\Qt\build-mingw-qtbase\bin $ strip Qt6Core.dll c:\Projects\Qt\build-mingw-qtbase\bin $ objdump -x Qt6Core.dll | findstr .gnu_debuglink And below the run with strip from MinGW 8.1.0: c:\Projects\Qt\build-mingw-qtbase\bin $ strip --version GNU strip (GNU Binutils) 2.30 Copyright (C) 2018 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. c:\Projects\Qt\build-mingw-qtbase\bin $ objdump -x Qt6Core.dll | findstr .gnu_debuglink 13 .gnu_debuglink 0014 000264537000 000264537000 005fca00 2**2 c:\Projects\Qt\build-mingw-qtbase\bin $ strip Qt6Core.dll c:\Projects\Qt\build-mingw-qtbase\bin $ objdump -x Qt6Core.dll | findstr .gnu_debuglink 13 .gnu_debuglink 0014 000264537000 000264537000 005fca00 2**2 I will try upgrading binutils to version 2.38 and try again. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/28992] strip strips .gnu_debuglink
https://sourceware.org/bugzilla/show_bug.cgi?id=28992 --- Comment #3 from Cristian Adam --- binutils 2.38 behave the same as 2.37 c:\Projects\Qt\build-mingw-qtbase\bin $ strip --version GNU strip (GNU Binutils) 2.38 Copyright (C) 2022 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. c:\Projects\Qt\build-mingw-qtbase\bin $ objdump -x Qt6Core.dll | findstr .gnu_debuglink 13 .gnu_debuglink 0014 000264537000 000264537000 005fca00 2**2 c:\Projects\Qt\build-mingw-qtbase\bin $ strip Qt6Core.dll c:\Projects\Qt\build-mingw-qtbase\bin $ objdump -x Qt6Core.dll | findstr .gnu_debuglink It could be that only master has the bug fixed. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/28992] strip strips .gnu_debuglink
https://sourceware.org/bugzilla/show_bug.cgi?id=28992 --- Comment #5 from Cristian Adam --- Created attachment 14058 --> https://sourceware.org/bugzilla/attachment.cgi?id=14058&action=edit Qt6Sql.dll Qt6Sql.dll containing the .gnu_debuglink section: $ objdump -x Qt6Sql.dll | findstr .gnu 12 .gnu_debuglink 0014 0002e7e44000 0002e7e44000 0004b000 2**2 Qt6Sql.dll is smaller than Qt6Core.dll -- You are receiving this mail because: You are on the CC list for the bug.