Bug 1924068
Summary: | binutils debuginfo misses code for bfd functions | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Michael Petlan <mpetlan> |
Component: | binutils | Assignee: | Nick Clifton <nickc> |
binutils sub component: | system-version | QA Contact: | Miloš Prchlík <mprchlik> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | unspecified | ||
Priority: | unspecified | CC: | fweimer, mprchlik, ohudlick |
Version: | 8.4 | Keywords: | Bugfix, Triaged |
Target Milestone: | rc | ||
Target Release: | 8.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | binutils-2.30-100.el8 | Doc Type: | No Doc Update |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-11-09 19:31:20 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Michael Petlan
2021-02-02 14:26:57 UTC
Hi Micahel, This is a strange one. The binutils-debuginfo rpm does exist, and it does contain debug information for some functions, but not all. GCC is responsible for generating the debug info and I am wondering if this is an artifact of the recent adoption of LTO compilation by default ... Cheers Nick OK, I have found the problem, but not the cause. The static version of the bfd library (libbfd.a) contains object files that are stripped of debug information. This looks like a build issue. Investigating.... So one of the things I'd recommend is looking at the libbfd.a in the build directory ie /build/builddir/BUILD first to see if it has the debuginfo. Then I'd look at the install directory (/build/builddir/BUILDROOT) to see if it was stripped away. Or it might just be a case where optimizing with LTO is losing some of the debuginfo. I could see that happening with aggressive inlining at LTO time, though it's *supposed* to work with debuginfo generation. Is this about the static library? All installed *.a libraries are stripped, so that linking with them produces stripped binaries. I proposed to change that in <https://fedoraproject.org/wiki/Changes/StaticLibraryDebuginfo> but it was rejected. (In reply to Florian Weimer from comment #4) > Is this about the static library? Yes - this is exactly the problem. > All installed *.a libraries are stripped, so that linking with them produces > stripped binaries. I proposed to change that in Michael - this is the source of the problem. The RHEL build system strips debug information from static archives and perf is linked against the static bfd library. Since *all* apps that use the bfd library are forced to link against the static version (the libbfd.so file is just a linker script fragement that causes the static version to be used) I have gone ahead and created a patch to the binutils.spec file that disables the debug info stripping. The patch is currently in rawhide (binutils-2.35.1-33.fc34) and it will be in RHEL-9 shortly. I do not however plan on updating binutils for RHEL-8.4.0 Instead I think that it would be better to fix this in RHEL-8.5.0. Fixed in binutils-2.30-98.el8. Verified with binutils-devel-2.30-101.el8. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: binutils security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:4364 |