* objdump.c (dump_headers): Fix output formatting for ELF32
authorThiemo Seufer <ths@networkno.de>
Tue, 21 May 2002 16:21:18 +0000 (16:21 +0000)
committerThiemo Seufer <ths@networkno.de>
Tue, 21 May 2002 16:21:18 +0000 (16:21 +0000)
architectures in a BFD64 enabled toolchain.
* bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
non-ELF targets.

bfd/ChangeLog
bfd/bfd.c
binutils/ChangeLog
binutils/objdump.c

index ccb0bb1685b2f94497ff4638b0ff0c57d1f4203e..db0f945fff219e11404c0f6e7451a30d6b297169 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+       * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
+       non-ELF targets.
+
 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
 
        * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
index 9de4d53d4d1f8095a89b75d0c25318b0a81e2f0e..0e72b0ba99f72829611f936cb1a1ac49cea43ae1 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -749,7 +749,6 @@ bfd_get_arch_size (abfd)
   if (abfd->xvec->flavour == bfd_target_elf_flavour)
     return (get_elf_backend_data (abfd))->s->arch_size;
 
-  bfd_set_error (bfd_error_wrong_format);
   return -1;
 }
 
index a4b8bfbce6199f9efcec30d034dcb6663d8374ea..ec724ed72c4c5ffd01b9e18dfab36a6817377e60 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+       * objdump.c (dump_headers): Fix output formatting for ELF32
+       architectures in a BFD64 enabled toolchain.
+
 2002-05-20  Kazu Hirata  <kazu@cs.umass.edu>
 
        * debug.c: Fix formatting.
index 535e0cd7e7864da09d7e5c4abacbe6648b84f582..715d1cbf1ccc6fca33df11d522bd9863ebd003f5 100644 (file)
@@ -361,7 +361,11 @@ dump_headers (abfd)
 #ifndef BFD64
   printf (_("Idx Name          Size      VMA       LMA       File off  Algn"));
 #else
-  printf (_("Idx Name          Size      VMA               LMA               File off  Algn"));
+  /* With BFD64, non-ELF returns -1 and wants always 64 bit addresses.  */
+  if (bfd_get_arch_size (abfd) == 32)
+    printf (_("Idx Name          Size      VMA       LMA       File off  Algn"));
+  else
+    printf (_("Idx Name          Size      VMA               LMA               File off  Algn"));
 #endif
 
   if (wide_output)