* ldlang.c (lang_size_sections): Change region check to handle
authorIan Lance Taylor <ian@airs.com>
Mon, 1 Apr 1996 22:51:35 +0000 (22:51 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 1 Apr 1996 22:51:35 +0000 (22:51 +0000)
regions which end at the highest possible address correctly.
From Roland Weber <roweber@ira.uka.de>.

ld/ChangeLog
ld/ldlang.c

index ea1da0a145e32082a58fff57ff91bde59b849416..df59d77ea9f5a334e8f8d44bc2fe2b6e1dc1b20d 100644 (file)
@@ -1,4 +1,8 @@
-Mon Apr  1 11:49:52 1996  Ian Lance Taylor  <ian@cygnus.com>
+Mon Apr  1 17:35:40 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+       * ldlang.c (lang_size_sections): Change region check to handle
+       regions which end at the highest possible address correctly.
+       From Roland Weber <roweber@ira.uka.de>.
 
        * ldlang.c (section_already_linked): New static function.
        (wild_doit): Discard sections with SEC_EXCLUDE set if not doing a
index 7bf27c443bc5fc47451cf0d50b19f4275b0c526a..c3dc4e9040fccf74bb63dbfdd949c84885522000 100644 (file)
@@ -2024,9 +2024,9 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
         {
           os->region->current = dot;
           /* Make sure this isn't silly.  */
-          if ((os->region->current < os->region->origin)
-              || (os->region->current
-                  > os->region->origin + os->region->length))
+          if (os->region->current < os->region->origin
+              || (os->region->current - os->region->origin
+                  > os->region->length))
             {
               if (os->addr_tree != (etree_type *) NULL)
                 {