[Bug lto/84847] [8 Regression] Incompatibility between early LTO debug and "-Wl,--gc-sections" leads to corrupt DWARF debuginfo

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Tue Mar 13 17:37:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84847

--- Comment #18 from rguenther at suse dot de <rguenther at suse dot de> ---
On March 13, 2018 5:15:33 PM GMT+01:00, "nickc at gcc dot gnu.org"
<gcc-bugzilla@gcc.gnu.org> wrote:
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84847
>
>--- Comment #16 from Nick Clifton <nickc at gcc dot gnu.org> ---
>Hi H.J.
>
>(In reply to H.J. Lu from comment #15)
>> It should be fixed in linker.
>
>OK - so how does the linker distinguish between a file that only
>contains
>debug information, none of which is needed, and a file that only
>contains
>debug information of which some/all actually is needed ?

There are used symbols and associated debug sections need to be kept. If
nothing references the debug it can be discarded. 

>Cheers
>  Nick


More information about the Gcc-bugs mailing list