summaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2009-09-22 18:29:06 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2009-09-22 18:29:06 +0000
commit9022847f3d8726564140c2ec85bd82a237e2eaa6 (patch)
tree7279e1bcf18d3ed54aa3e6d567b20a18c742d855 /binutils/objdump.c
parent04c1587fde02de3e350d4c74fc0f1c21e6860cbe (diff)
downloadbinutils-redhat-9022847f3d8726564140c2ec85bd82a237e2eaa6.tar.gz
binutils/
* objdump.c (disassemble_section): Use bfd_get_arch_size instead of assuming that the address size is 32 bits.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 3768f7e2b9..dd0d0ef50c 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