This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] GAS: Fix bogus "attempt to move .org backwards" relaxation errors
- From: Alan Modra <amodra at gmail dot com>
- To: "Maciej W. Rozycki" <macro at imgtec dot com>
- Cc: Faraz Shahbazker <faraz dot shahbazker at imgtec dot com>, binutils at sourceware dot org
- Date: Thu, 2 Mar 2017 10:18:54 +1030
- Subject: Re: [PATCH] GAS: Fix bogus "attempt to move .org backwards" relaxation errors
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.00.1703011257230.16579@tp.orcam.me.uk>
On Wed, Mar 01, 2017 at 05:13:44PM +0000, Maciej W. Rozycki wrote:
> Index: binutils/gas/write.c
> ===================================================================
> --- binutils.orig/gas/write.c 2017-03-01 14:12:17.313787305 +0000
> +++ binutils/gas/write.c 2017-03-01 14:23:24.928461971 +0000
> @@ -2692,7 +2692,7 @@ relax_segment (struct frag *segment_frag
> know (fragP->fr_next);
> after = fragP->fr_next->fr_address + stretch;
> growth = target - after;
> - if (growth < 0)
> + if (address + fragP->fr_fix > target)
> {
> growth = 0;
>
OK, but please move the comment from as_bad_where call to just before
the test.
--
Alan Modra
Australia Development Lab, IBM