* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
authorHans-Peter Nilsson <hp@axis.com>
Mon, 4 Feb 2002 04:42:29 +0000 (04:42 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Mon, 4 Feb 2002 04:42:29 +0000 (04:42 +0000)
arithmetic when checking for too many global registers.

ld/ChangeLog
ld/emultempl/mmix-elfnmmo.em

index 7b46215f91383e870039dbf241926bc70b6c2def..baee9896b7a8eb79d22ca27e7ad1086a533e154b 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
+       arithmetic when checking for too many global registers.
+
 2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>
 
        * Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
index 1b72a643baf98873f598544ce7f7714844c1ad6c..c6c7691abb31c1f3a6dd7f3ae4c425fa8481f281 100644 (file)
@@ -59,7 +59,7 @@ mmix_after_allocation ()
 {
   asection *sec
     = bfd_get_section_by_name (output_bfd, MMIX_REG_CONTENTS_SECTION_NAME);
-  bfd_vma regvma;
+  bfd_signed_vma regvma;
 
   /* If there's no register section, we don't need to do anything.  */
   if (sec == NULL)
@@ -73,7 +73,7 @@ mmix_after_allocation ()
           (unsigned) sec->_raw_size / 8);
 
   /* Set vma to correspond to first such register number * 8.  */
-  bfd_set_section_vma (output_bfd, sec, regvma);
+  bfd_set_section_vma (output_bfd, sec, (bfd_vma) regvma);
 
   /* ??? Why isn't the section size (_cooked_size) set?  Doesn't it get
      set regardless of presence of relocations?  */