summaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2004-09-24 07:07:19 +0000
committerAlan Modra <amodra@bigpond.net.au>2004-09-24 07:07:19 +0000
commit756b0c73ca12f78127658ba739a662a89da178c8 (patch)
tree4a7b2043572935706ec725fc7cfa8dfa7aa34b37 /bfd/dwarf2.c
parentfe137abc5ad2eb6bb1f7c628f50c39507bff4e39 (diff)
downloadgdb-756b0c73ca12f78127658ba739a662a89da178c8.tar.gz
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.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r--bfd/dwarf2.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index a09265755a0..b1f4ea68854 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;