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]

Missing TO_ADDR


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

-- 
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]