summaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-03-05 16:31:50 +0000
committerNick Clifton <nickc@redhat.com>2009-03-05 16:31:50 +0000
commit8682d82350dbfadc6a6c836ffa79f98410c92eaa (patch)
tree617fb162b640d6a45a42d2e82f70c5b7626db8f1 /binutils/objdump.c
parent0f65e4b5c202baaf8011f2ff167d36b3840dec07 (diff)
downloadbinutils-redhat-8682d82350dbfadc6a6c836ffa79f98410c92eaa.tar.gz
* objdump.c (disassemble_section): If the computed next offset is
not beyond the current offset then just continue to the end.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 59289e0552..265a8ead44 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -1961,7 +1961,8 @@ disassemble_section (bfd *abfd, asection *section, void *info)
else
nextstop_offset = bfd_asymbol_value (nextsym) - section->vma;
- if (nextstop_offset > stop_offset)
+ if (nextstop_offset > stop_offset
+ || nextstop_offset <= addr_offset)
nextstop_offset = stop_offset;
/* If a symbol is explicitly marked as being an object
@@ -1984,7 +1985,7 @@ disassemble_section (bfd *abfd, asection *section, void *info)
disassemble_bytes (pinfo, paux->disassemble_fn, insns, data,
addr_offset, nextstop_offset,
rel_offset, &rel_pp, rel_ppend);
-
+
addr_offset = nextstop_offset;
sym = nextsym;
}