[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/25561] Incorrect DWARF info emitted when variable removed due to
From: |
nickc at redhat dot com |
Subject: |
[Bug ld/25561] Incorrect DWARF info emitted when variable removed due to --gc-sections |
Date: |
Mon, 02 Mar 2020 16:23:38 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25561
Nick Clifton <nickc at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |nickc at redhat dot com
Resolution|--- |WONTFIX
--- Comment #1 from Nick Clifton <nickc at redhat dot com> ---
Hi Chris,
> The "DW_AT_location" of a variable which is discarded as a result of using
> the CFLAG -fdata-sections and the LDFLAG --gc-sections will be incorrectly
> set to 0.
Sadly this is a known problem and not an easy one to fix.
The issue is that in order for the linker to be able to correctly discard DWARF
information that is no longer relevant it must be told which pieces of
information below to which variable (or function, or whatever). In order to do
this the compiler needs to compartmentalise the debug information so that all
the DWARF associated with one data section is placed into a separate debug
section, and the two are linked together by a section group. Once this is
done, the linker will automatically discard the debug information when it
discards the data section. Hence this is really a gcc problem, not a binutils
one.
Cheers
Nick
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/25561] Incorrect DWARF info emitted when variable removed due to --gc-sections,
nickc at redhat dot com <=