* objdump.c (disassemble_section): If the computed next offset is
authorNick Clifton <nickc@redhat.com>
Thu, 5 Mar 2009 16:31:50 +0000 (16:31 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 5 Mar 2009 16:31:50 +0000 (16:31 +0000)
        not beyond the current offset then just continue to the end.

binutils/ChangeLog
binutils/objdump.c

index 8b4038a94d0d615d402ac96db29dd4ec12a111ef..45082bfdad0a092f4e2f0760f0cb5a78d3414625 100644 (file)
@@ -1,3 +1,8 @@
+2009-03-05  Nick Clifton  <nickc@redhat.com>
+
+       * objdump.c (disassemble_section): If the computed next offset is
+       not beyond the current offset then just continue to the end.
+
 2009-03-04  Tristan Gingold  <gingold@adacore.com>
 
        * MAINTAINERS: Add myself as VMS maintainer.
index 59289e0552513ddd7da19a66ebaa62db5c5f069b..265a8ead44f7467211a1b893fd2fb6faefd235a7 100644 (file)
@@ -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;
     }