]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
binutils/
authorRichard Sandiford <rdsandiford@googlemail.com>
Tue, 22 Sep 2009 18:30:46 +0000 (18:30 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Tue, 22 Sep 2009 18:30:46 +0000 (18:30 +0000)
* objdump.c (disassemble_section): Use bfd_get_arch_size
instead of assuming that the address size is 32 bits.

binutils/ChangeLog
binutils/objdump.c

index 336d7a5884c0de70af42c83d77e8493a3f1d8b02..c9698bc81811d210a88b0b813077e63ad2b1c55e 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-22  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * objdump.c (disassemble_section): Use bfd_get_arch_size
+       instead of assuming that the address size is 32 bits.
+
 2009-09-21  Alan Modra  <amodra@bigpond.net.au>
 
        * readelf.c (get_ppc_dynamic_type): Add TLSOPT.
index 3768f7e2b934b0513d5a4fe7cdbc50b51036294a..dd0d0ef50c27a1c1438694658376c509a4cc13ec 100644 (file)
@@ -1891,13 +1891,13 @@ disassemble_section (bfd *abfd, asection *section, void *info)
                                              &place);
   paux->require_sec = FALSE;
 
-  /* PR 9774: If the target used signed 32-bit addresses then we must make
-     sure that we sign extend the value that we calculate for 'addr' in the
-     loop below.  */
+  /* PR 9774: If the target used signed addresses then we must make
+     sure that we sign extend the value that we calculate for 'addr'
+     in the loop below.  */
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
       && (bed = get_elf_backend_data (abfd)) != NULL
       && bed->sign_extend_vma)
-    sign_adjust = 0x80000000;
+    sign_adjust = (bfd_vma) 1 << (bed->s->arch_size - 1);
 
   /* Disassemble a block of instructions up to the address associated with
      the symbol we have just found.  Then print the symbol and find the