* objdump.c (disassemble_section): Mask address before sign extending.
authorAlan Modra <amodra@gmail.com>
Tue, 3 Mar 2009 01:27:15 +0000 (01:27 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 3 Mar 2009 01:27:15 +0000 (01:27 +0000)
binutils/ChangeLog
binutils/objdump.c

index 8d18b55e24224a8b094448204bc3088d18b3c3b7..2d6316954dfdf67463ac6004153533e11b0eec2c 100644 (file)
@@ -1,3 +1,7 @@
+2009-03-03  Alan Modra  <amodra@bigpond.net.au>
+
+       * objdump.c (disassemble_section): Mask address before sign extending.
+
 2009-03-02  Sebastian Biallas  <sb@biallas.net>
 
        * ieee.c (parse_ieee_ty): Add support for undocumented 'v' type.
@@ -5,7 +9,7 @@
        discovered.
 
 2009-03-02  Cary Coutant  <ccoutant@google.com>
-       
+
        * readelf.c (adjust_relative_path): New function.
        (struct archive_info): New type.
        (setup_archive): New function.
@@ -66,7 +70,7 @@
        * dwarf.h (do_debug_lines_decoded): Remove.
        Add prototypes for the new functions.
        (struct dwarf_section_display): Add enabled field.
-       
+
 2009-02-06  Nick Clifton  <nickc@redhat.com>
 
        * po/vi.po: Updated Vietnamese translation.
        (identify_member_contains_symname): New function.
        (identify_dll_for_implib): Rewrite. Now determines whether implib
        is ms- or binutils- style, before searching sections for
-       dllname. Allows multiple dllnames. 
+       dllname. Allows multiple dllnames.
        (identify_process_section_p): Search alternate section for dllname
        when implib is ms-style.
        (identify_search_section): Add additional conditions to excludes
index 968a667f4a557abfc78cc463dba08440f43a8f28..59289e0552513ddd7da19a66ebaa62db5c5f069b 100644 (file)
@@ -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)
        {