[PATCH] GAS: Fix bogus "attempt to move .org backwards" relaxation errors
Alan Modra
amodra@gmail.com
Wed Mar 1 23:49:00 GMT 2017
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
More information about the Binutils
mailing list