From 095ad3b84d615bd84860031fbfc0a620a2c268dc Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 3 Mar 2009 01:27:15 +0000 Subject: [PATCH] * objdump.c (disassemble_section): Mask address before sign extending. --- binutils/ChangeLog | 10 +++++++--- binutils/objdump.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 8d18b55e242..2d6316954df 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2009-03-03 Alan Modra + + * objdump.c (disassemble_section): Mask address before sign extending. + 2009-03-02 Sebastian Biallas * ieee.c (parse_ieee_ty): Add support for undocumented 'v' type. @@ -5,7 +9,7 @@ discovered. 2009-03-02 Cary Coutant - + * 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 * po/vi.po: Updated Vietnamese translation. @@ -208,7 +212,7 @@ (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 diff --git a/binutils/objdump.c b/binutils/objdump.c index 968a667f4a5..59289e05525 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) { -- 2.30.2