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: Missing TO_ADDR


Don't forget the "minfo ("0x%V %W", section->vma ..." line that needs
its "section->size" parameter changed to TO_ADDR(section->size), or the
"lma = last->lma+last->size" that needs to be changed to "lma =
last->lma + TO_ADDR(last->size);".  At least according to my last git
pull, those changes still needed to be made as well.

Dan



On Wed, 2016-03-30 at 18:01 +1030, Alan Modra wrote:
> Calculates the wrong end address on targets with octets_per_byte
> not equal to one.
> 
> 	* ldlang.c (lang_size_sections_1): Correct code detecting a
> 	backward non-overlapping move.
> 
> diff --git a/ld/ldlang.c b/ld/ldlang.c
> index 235a246..b369f99 100644
> --- a/ld/ldlang.c
> +++ b/ld/ldlang.c
> @@ -5068,7 +5068,7 @@ lang_size_sections_1
>  		   create overlapping LMAs.  */
>  		if (dot < last->vma
>  		    && os->bfd_section->size != 0
> -		    && dot + os->bfd_section->size <= last->vma)
> +		    && dot + TO_ADDR (os->bfd_section->size) <= last->vma)
>  		  {
>  		    /* If dot moved backwards then leave lma equal to
>  		       vma.  This is the old default lma, which might
> 


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