* objdump.c (dump_dwarf): Use bfd_arch_bits_per_address.
authorRichard Henderson <rth@redhat.com>
Thu, 2 Sep 2010 21:34:22 +0000 (21:34 +0000)
committerRichard Henderson <rth@redhat.com>
Thu, 2 Sep 2010 21:34:22 +0000 (21:34 +0000)
binutils/ChangeLog
binutils/objdump.c

index 351fe4741fe9d37362af05d5c5898cb08ca868c7..ed4030a8e28ed5b04f4cbaa68d62351ea9c8ddc4 100644 (file)
@@ -1,3 +1,7 @@
+2010-08-23  Richard Henderson  <rth@redhat.com>
+
+       * objdump.c (dump_dwarf): Use bfd_arch_bits_per_address.
+
 2010-08-23  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elfedit.c (input_elf_osabi): New.
index f94dee968e27ce452351de71cd50d4fbfa081050..ca7741d6fc2027eb28ed83c82127a81d06579d8e 100644 (file)
@@ -2340,9 +2340,7 @@ dump_dwarf (bfd *abfd)
 {
   is_relocatable = (abfd->flags & (EXEC_P | DYNAMIC)) == 0;
 
-  /* FIXME: bfd_get_arch_size may return -1.  We assume that 64bit
-     targets will return 64.  */
-  eh_addr_size = bfd_get_arch_size (abfd) == 64 ? 8 : 4;
+  eh_addr_size = bfd_arch_bits_per_address (abfd) / 8;
 
   if (bfd_big_endian (abfd))
     byte_get = byte_get_big_endian;