This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dwarf2 and objdump -S --adjust-vma


Hi Karsten,

> while debuging some x86-64 kernel problem I found a bug in
> dwarf and objdump -S --adjust-vma handling.

Thanks for submitting this bug report.  I have applied the patch below
to fix this problem.

Cheers
        Nick

2001-05-28  Nick Clifton  <nickc@cambridge.redhat.com>

	* objdump.c (disassemble_bytes): Remove section VMA adjustment
	when computing the address of the line to show.

Index: objdump.c
===================================================================
RCS file: /cvs/cvsfiles/devo/binutils/objdump.c,v
retrieving revision 1.224
diff -p -r1.224 objdump.c
*** objdump.c	2001/03/15 04:23:19	1.224
--- objdump.c	2001/05/28 10:05:05
*************** disassemble_bytes (info, disassemble_fn,
*** 1328,1334 ****
  	  done_dot = false;
  
  	  if (with_line_numbers || with_source_code)
! 	    show_line (aux->abfd, section, addr_offset);
  
  	  if (! prefix_addresses)
  	    {
--- 1328,1337 ----
  	  done_dot = false;
  
  	  if (with_line_numbers || with_source_code)
! 	    /* The line number tables will refer to unadjusted
! 	       section VMAs, so we must undo any VMA modifications
! 	       when calling show_line.  */
! 	    show_line (aux->abfd, section, addr_offset - adjust_section_vma);
  
  	  if (! prefix_addresses)
  	    {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]