aboutsummaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-09-24 07:07:22 +0000
committerAlan Modra <amodra@gmail.com>2004-09-24 07:07:22 +0000
commit1ba54ee0206e3d32ee062d24d8342cd713ab4a0a (patch)
tree371f2e8f556d79b4586c1190306581fdcda8d595 /bfd/dwarf2.c
parent5efb626185b9820d357696c1ade63ec19b24a80d (diff)
downloadgdb-1ba54ee0206e3d32ee062d24d8342cd713ab4a0a.zip
gdb-1ba54ee0206e3d32ee062d24d8342cd713ab4a0a.tar.gz
gdb-1ba54ee0206e3d32ee062d24d8342cd713ab4a0a.tar.bz2
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 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;