This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Fix strip when sections are not sorted
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Fri, 27 Jul 2007 09:57:53 +0930
- Subject: Re: Fix strip when sections are not sorted
- References: <20070725152846.GA22770@caradoc.them.org>
On Wed, Jul 25, 2007 at 11:28:46AM -0400, Daniel Jacobowitz wrote:
> I think we should use the lowest section address, rather than the
> first section encountered. Is this patch OK?
Looks reasonable to me,
> if (!first_section)
> - first_section = section;
> + first_section = lowest_section = section;
> + if (section->vma < lowest_section->vma)
> + lowest_section = section;
> section_count++;
except that I'd be inclined to use lma here rather than vma.
--
Alan Modra
Australia Development Lab, IBM