This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] PR ld/20882: Mark debug sections referenced by kept debug sections
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 17 May 2017 10:57:52 +0930
- Subject: Re: [PATCH] PR ld/20882: Mark debug sections referenced by kept debug sections
- Authentication-results: sourceware.org; auth=none
- References: <20170516200618.GA25459@lucon.org>
On Tue, May 16, 2017 at 01:06:18PM -0700, H.J. Lu wrote:
> if (! debug_frag_seen)
> - continue;
> + {
> + if (has_kept_debug_info)
> + goto mark_kept_debug_info;
> + else
> + continue;
> + }
>
> /* Look for CODE sections which are going to be discarded,
> and find and discard any fragmented debug sections which
I think the loop handling .debug*.text.* should be run before your new
gc_mark loop. ie. Rather than the above hunk, you should condition
the loop immediately after the comment as
if (debug_frag_seen)
for (isec = ibfd->sections; isec != NULL; isec = isec->next)
if ((isec->flags & SEC_CODE) != 0
&& isec->gc_mark == 0)
OK with that change and of course deleting the goto label. Also,
please tabify the testcase source files.
--
Alan Modra
Australia Development Lab, IBM