From 65077aa81507c722eb00b1ed594d2ee11c491cc6 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 26 May 2010 07:37:36 +0000 Subject: 2010-05-25 Tristan Gingold * bfdio.c: Declare and define _bfd_memory_iovec. (bfd_bread): Move code for BFD_IN_MEMORY... (bfd_bwrite): ... Ditto ... (bfd_tell): ... Ditto ... (bfd_flush): ... Ditto ... (bfd_stat): ... Ditto ... (bfd_seek): ... Ditto ... (bfd_get_size): ... Ditto ... (bfd_mmap): ... Ditto ... (memory_bread): ... to these new functions. (memory_bwrite): Ditto. (memory_btell): Ditto. (memory_bseek): Ditto. (memory_bflush): Ditto. (memory_bstat): Ditto. (memory_bmmap): Ditto. (memory_bclose): New function. * peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY. * xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto. * opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case. (bfd_make_writable): Use _bfd_memory_iovec. * elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec. * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use _bfd_memory_iovec. (alpha_ecoff_openr_next_archived_file): Use proxy_origin instead of origin. * libbfd.h: Regenerate. --- bfd/coff-alpha.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bfd/coff-alpha.c') diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c index 49af03a..12b49ac 100644 --- a/bfd/coff-alpha.c +++ b/bfd/coff-alpha.c @@ -2226,6 +2226,8 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos) nbfd->flags |= BFD_IN_MEMORY; nbfd->iostream = (PTR) bim; + nbfd->iovec = &_bfd_memory_iovec; + nbfd->origin = 0; BFD_ASSERT (! nbfd->cacheable); return nbfd; @@ -2264,7 +2266,7 @@ alpha_ecoff_openr_next_archived_file (archive, last_file) /* Pad to an even boundary... Note that last_file->origin can be odd in the case of BSD-4.4-style element with a long odd size. */ - filestart = last_file->origin + size; + filestart = last_file->proxy_origin + size; filestart += filestart % 2; } -- cgit v1.1