aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-03-03 01:27:15 +0000
committerAlan Modra <amodra@gmail.com>2009-03-03 01:27:15 +0000
commit095ad3b84d615bd84860031fbfc0a620a2c268dc (patch)
treeb650e557ca5ffbd3adbdab03f62ec9a054e3a9d6 /binutils/objdump.c
parent3f1a2bb360366758014c9b8e531adf3a09e2ee1e (diff)
downloadgdb-095ad3b84d615bd84860031fbfc0a620a2c268dc.zip
gdb-095ad3b84d615bd84860031fbfc0a620a2c268dc.tar.gz
gdb-095ad3b84d615bd84860031fbfc0a620a2c268dc.tar.bz2
* objdump.c (disassemble_section): Mask address before sign extending.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 968a667..59289e0 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -1898,7 +1898,7 @@ disassemble_section (bfd *abfd, asection *section, void *info)
bfd_boolean insns;
addr = section->vma + addr_offset;
- addr = (addr ^ sign_adjust) - sign_adjust;
+ addr = ((addr & ((sign_adjust << 1) - 1)) ^ sign_adjust) - sign_adjust;
if (sym != NULL && bfd_asymbol_value (sym) <= addr)
{