This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] GAS: Fix bogus "attempt to move .org backwards" relaxation errors


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]