Fix support for native 64bit ELF systems
authorNick Clifton <nickc@redhat.com>
Fri, 10 Dec 1999 18:32:57 +0000 (18:32 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 10 Dec 1999 18:32:57 +0000 (18:32 +0000)
binutils/ChangeLog
binutils/readelf.c

index 39806f58dcbf1b52c747ccf26a8ced28a6d8cfa8..07548ef3ba2e93449cfb2b80ca2717dcafdff1fb 100644 (file)
@@ -1,3 +1,7 @@
+1999-12-10  Nick Clifton  <nickc@cygnus.com>
+
+       * readelf.c (print_vma): Support native 64bit ELF systems.
+
 1999-12-09  Nick Clifton  <nickc@cygnus.com>
 
        * dlltool.c (mtable): Add epoc-arm specific entry.
index 637cdcba8c319eb34edd1885baa6cc4d45f56f69..a2b5bcff4332b36f5e605f5427968ff1f9c55c0e 100644 (file)
@@ -442,27 +442,39 @@ print_vma (vma, mode)
          break;
 
        case DEC:
+#if BFD_HOST_64BIT_LONG
+         printf ("%ld", vma);
+#else
          if (_bfd_int64_high (vma))
            /* ugg */
            printf ("++%ld", _bfd_int64_low (vma));
          else
            printf ("%ld", _bfd_int64_low (vma));
+#endif   
          break;
 
        case DEC_5:
+#if BFD_HOST_64BIT_LONG
+         printf ("%5ld", vma);
+#else
          if (_bfd_int64_high (vma))
            /* ugg */
            printf ("++%ld", _bfd_int64_low (vma));
          else
            printf ("%5ld", _bfd_int64_low (vma));
+#endif   
          break;
          
        case UNSIGNED:
+#if BFD_HOST_64BIT_LONG
+         printf ("%lu", vma);
+#else    
          if (_bfd_int64_high (vma))
            /* ugg */
            printf ("++%lu", _bfd_int64_low (vma));
          else
            printf ("%lu", _bfd_int64_low (vma));
+#endif
          break;
        }
     }