This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix .debug_rnglists generation with -gdwarf-5 -gsplit-dwarf.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Mark Wielaard <mark at klomp dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Nov 2017 14:33:35 +0100
- Subject: Re: [PATCH] Fix .debug_rnglists generation with -gdwarf-5 -gsplit-dwarf.
- Authentication-results: sourceware.org; auth=none
- References: <1511442837-6114-1-git-send-email-mark@klomp.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Nov 23, 2017 at 02:13:57PM +0100, Mark Wielaard wrote:
> Early debug broke generation of .debug_rnglists when using both -gdwarf5
> and -gsplit-dwarf. It introduces a generation for init_sections_and_labels,
> but doesn't account for the generation of up to 4 unique ranges labels,
> two created in init_sections_and_labels and two in output_rnglists.
> Fix this by passing generation to output_rnglists and creating 4 unique
> labels per generation.
>
> Without this fix using -gdwarf-5 -gsplit-dwarf could result in:
> Error: symbol `.Ldebug_ranges2' is already defined
>
> gcc/ChangeLog:
>
> * dwarf2out.c (init_sections_and_labels): Use generation to create
> unique ranges_section_label and ranges_base_label. Return generation.
> (output_rnglists): Add generation argument. Use generation to create
> unique ranges labels.
> (dwarf2out_finish): Get generation from init_sections_and_labels
> and pass generation to output_rnglists.
Ok. Though, note that -gdwarf-5 -gsplit-dwarf is really unfinished anyway,
I did what was easy, but left out what was harder and did no testing at all
(don't know what tools are needed for the split dwarf processing etc.).
Jakub