From 1ba54ee0206e3d32ee062d24d8342cd713ab4a0a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 24 Sep 2004 07:07:22 +0000 Subject: bfd/ * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section vma and output offset to address. * simple.c (simple_save_output_info): Only set output section and offset for debug sections, or those not already set up by the linker. (bfd_simple_get_relocated_section_contents): Update comment. ld/testsuite/ * ld-elfvsb/elfvsb.exp: Remove file name from "undefined ref" string. --- bfd/dwarf2.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bfd/dwarf2.c') diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index a092657..b1f4ea6 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -1703,13 +1703,19 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, We keep a list of all the previously read compilation units, and a pointer to the next un-read compilation unit. Check the previously read units before reading more. */ - struct dwarf2_debug *stash = *pinfo; + struct dwarf2_debug *stash; /* What address are we looking for? */ - bfd_vma addr = offset + section->vma; + bfd_vma addr; struct comp_unit* each; + stash = *pinfo; + addr = offset; + if (section->output_section) + addr += section->output_section->vma + section->output_offset; + else + addr += section->vma; *filename_ptr = NULL; *functionname_ptr = NULL; *linenumber_ptr = 0; -- cgit v1.1