2005-12-31 H.J. Lu PR binutils/2096 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Use section's vma, instead of lvm for ELF. --- bfd/dwarf2.c.addr 2005-12-27 12:35:54.000000000 -0800 +++ bfd/dwarf2.c 2005-12-31 12:05:36.000000000 -0800 @@ -2209,10 +2209,21 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd stash = *pinfo; addr = offset; - if (section->output_section) - addr += section->output_section->lma + section->output_offset; + if (abfd->xvec->flavour == bfd_target_elf_flavour) + { + if (section->output_section) + addr += section->output_section->vma + section->output_offset; + else + addr += section->vma; + } else - addr += section->lma; + { + if (section->output_section) + addr += section->output_section->lma + section->output_offset; + else + addr += section->lma; + } + *filename_ptr = NULL; *functionname_ptr = NULL; *linenumber_ptr = 0; @@ -2418,10 +2429,20 @@ _bfd_dwarf2_find_line (bfd *abfd, section = bfd_get_section (symbol); addr = symbol->value; - if (section->output_section) - addr += section->output_section->lma + section->output_offset; + if (abfd->xvec->flavour == bfd_target_elf_flavour) + { + if (section->output_section) + addr += section->output_section->vma + section->output_offset; + else + addr += section->vma; + } else - addr += section->lma; + { + if (section->output_section) + addr += section->output_section->lma + section->output_offset; + else + addr += section->lma; + } *filename_ptr = NULL; stash = *pinfo;