* ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: If common page size
authorJakub Jelinek <jakub@redhat.com>
Wed, 3 Apr 2002 10:25:41 +0000 (10:25 +0000)
committerJakub Jelinek <jakub@redhat.com>
Wed, 3 Apr 2002 10:25:41 +0000 (10:25 +0000)
is smaller than maximum, round dot up to common page boundary.

ld/ChangeLog
ld/ldexp.c

index 929977e3afbbe3e8d75d5bbde6e818a2b7af050b..33c861e16f26117ecfa1de48c6b9fbbb4a6458dd 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-03  Jakub Jelinek  <jakub@redhat.com>
+
+       * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: If common page size
+       is smaller than maximum, round dot up to common page boundary.
+
 2002-03-28  Alan Modra  <amodra@bigpond.net.au>
 
        * configure.host: Set up for generic hosts first, then tweak as
index 903374ed019a717348a9ea2ec20b150e791e4a67..c4876a877e30f2d2032b0e85be1eca4974e326b0 100644 (file)
@@ -356,7 +356,8 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
                        }
                    }
                  else if (other.value < maxpage)
-                   result.value += dot & (maxpage - other.value);
+                   result.value += (dot + other.value - 1)
+                                   & (maxpage - other.value);
                }
              else
                result.valid_p = false;