This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Missing TO_ADDR
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 30 Mar 2016 18:01:51 +1030
- Subject: Missing TO_ADDR
- Authentication-results: sourceware.org; auth=none
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