diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-01-15 20:47:32 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-01-15 20:47:32 +0000 |
commit | 45ca3195d575bc8ba0434e3eb709a9096d2d8c08 (patch) | |
tree | c90643a5e595a9b33c9ef5bc9f7ff25e7bcf3754 /bfd/coffgen.c | |
parent | 252239f877583b3acf674237b898cf78e4a01783 (diff) | |
download | gdb-45ca3195d575bc8ba0434e3eb709a9096d2d8c08.zip gdb-45ca3195d575bc8ba0434e3eb709a9096d2d8c08.tar.gz gdb-45ca3195d575bc8ba0434e3eb709a9096d2d8c08.tar.bz2 |
* coffgen.c (coff_find_nearest_line): Don't try to cache
information in sections that are not owned by a BFD. From Richard
Henderson <richard@atheist.tamu.edu>.
Diffstat (limited to 'bfd/coffgen.c')
-rw-r--r-- | bfd/coffgen.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 7ad5b6f..3797ec8 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -81,10 +81,8 @@ make_a_section_from_file (abfd, hdr, target_index) if (return_section == NULL) return false; - /* s_paddr is presumed to be = to s_vaddr */ - return_section->vma = hdr->s_vaddr; - return_section->lma = return_section->vma; + return_section->lma = hdr->s_paddr; return_section->_raw_size = hdr->s_size; return_section->filepos = hdr->s_scnptr; return_section->rel_filepos = hdr->s_relptr; @@ -2076,7 +2074,7 @@ coff_find_nearest_line (abfd, section, ignore_symbols, offset, filename_ptr, } /* Cache the results for the next call. */ - if (sec_data == NULL) + if (sec_data == NULL && section->owner == abfd) { section->used_by_bfd = ((PTR) bfd_zalloc (abfd, |