Missing TO_ADDR
authorAlan Modra <amodra@gmail.com>
Wed, 30 Mar 2016 07:10:37 +0000 (17:40 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 30 Mar 2016 07:20:03 +0000 (17:50 +1030)
* ldlang.c (lang_size_sections_1): Correct code detecting a
backward non-overlapping move.

ld/ChangeLog
ld/ldlang.c

index 4508d2e..5a2df38 100644 (file)
@@ -1,5 +1,10 @@
 2016-03-30  Alan Modra  <amodra@gmail.com>
 
+       * ldlang.c (lang_size_sections_1): Correct code detecting a
+       backward non-overlapping move.
+
+2016-03-30  Alan Modra  <amodra@gmail.com>
+
        * ldlang.c (IS_TBSS): New macro, extracted from..
        (IGNORE_SECTION): ..here.
        (lang_size_sections_1): Use IS_TBSS and IGNORE_SECTION.
index 235a246..b369f99 100644 (file)
@@ -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