diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2009-09-22 18:29:06 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2009-09-22 18:29:06 +0000 |
commit | 46bc35a936e8372bc1ead7a843e582015212208f (patch) | |
tree | 92bf66bb80d9fa33bd1a9fb774d9c41c60a55b5e | |
parent | 2fd0b40ba3678c19c057fcaae0ae5457cc5b0396 (diff) | |
download | gdb-46bc35a936e8372bc1ead7a843e582015212208f.zip gdb-46bc35a936e8372bc1ead7a843e582015212208f.tar.gz gdb-46bc35a936e8372bc1ead7a843e582015212208f.tar.bz2 |
binutils/
* objdump.c (disassemble_section): Use bfd_get_arch_size
instead of assuming that the address size is 32 bits.
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/objdump.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index e049c1d..a41b729 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -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. diff --git a/binutils/objdump.c b/binutils/objdump.c index 3768f7e..dd0d0ef 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -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 |