summaryrefslogtreecommitdiff
path: root/bfd/simple.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2004-09-24 07:07:22 +0000
committerAlan Modra <amodra@bigpond.net.au>2004-09-24 07:07:22 +0000
commit0f2eaaa0c54fdd76ddf34a908bb48ca2467e934f (patch)
treec9f85d95879ccf9d7cf9b379ac2002f4a9a7edfd /bfd/simple.c
parent17c88bc14dea5cbf1325d0c3ab37e45967215cc7 (diff)
downloadbinutils-redhat-0f2eaaa0c54fdd76ddf34a908bb48ca2467e934f.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/simple.c')
-rw-r--r--bfd/simple.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/bfd/simple.c b/bfd/simple.c
index 5039911dcf..41aa950955 100644
--- a/bfd/simple.c
+++ b/bfd/simple.c
@@ -92,8 +92,12 @@ simple_save_output_info (bfd *abfd ATTRIBUTE_UNUSED,
struct saved_output_info *output_info = ptr;
output_info[section->index].offset = section->output_offset;
output_info[section->index].section = section->output_section;
- section->output_offset = 0;
- section->output_section = section;
+ if ((section->flags & SEC_DEBUGGING) != 0
+ || section->output_section == NULL)
+ {
+ section->output_offset = 0;
+ section->output_section = section;
+ }
}
static void
@@ -117,13 +121,10 @@ SYNOPSIS
DESCRIPTION
Returns the relocated contents of section @var{sec}. The symbols in
@var{symbol_table} will be used, or the symbols from @var{abfd} if
- @var{symbol_table} is NULL. The output offsets for all sections will
+ @var{symbol_table} is NULL. The output offsets for debug sections will
be temporarily reset to 0. The result will be stored at @var{outbuf}
or allocated with @code{bfd_malloc} if @var{outbuf} is @code{NULL}.
- Generally all sections in @var{abfd} should have their
- @code{output_section} pointing back to the original section.
-
Returns @code{NULL} on a fatal error; ignores errors applying
particular relocations.
*/