aboutsummaryrefslogtreecommitdiff
path: root/gold/archive.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-04-02 20:58:21 +0000
committerIan Lance Taylor <ian@airs.com>2008-04-02 20:58:21 +0000
commit39d0cb0e83f9eb33feb96a18f24607065426d089 (patch)
tree3b147c4a9fe94f4eb2cb847999db7adc5ae70e5c /gold/archive.h
parent5caffa0e9b4a3cab0749be6b30fa7ebeda6b62f5 (diff)
downloadfsf-binutils-gdb-39d0cb0e83f9eb33feb96a18f24607065426d089.zip
fsf-binutils-gdb-39d0cb0e83f9eb33feb96a18f24607065426d089.tar.gz
fsf-binutils-gdb-39d0cb0e83f9eb33feb96a18f24607065426d089.tar.bz2
* fileread.cc (File_read::find_view): Add byteshift and vshifted
parameters. Update for new key type to views_. Change all callers. (File_read::read): Adjust for byteshift in returned view. (File_read::add_view): New function, broken out of find_and_make_view. (File_read::make_view): New function, broken out of find_and_make_view. (File_read::find_or_make_view): Add offset and aligned parameters. Rewrite accordingly. Change all callers. (File_read::get_view): Add offset and aligned parameters. Adjust for byteshift in return value. (File_read::get_lasting_view): Likewise. * fileread.h (class File_read): Update declarations. (class File_read::View): Add byteshift_ field. Add byteshift to constructor. Add byteshift method. * archive.h (Archive::clear_uncached_views): New function. (Archive::get_view): Add aligned parameter. Change all callers. * object.h (Object::get_view): Add aligned parameter. Change all callers. (Object::get_lasting_view): Likewise. * fileread.cc (File_read::release): Don't call clear_views if there are multiple objects. * fileread.h (File_read::clear_uncached_views): New function. * archive.cc (Add_archive_symbols::run): Call clear_uncached_views on the archive.
Diffstat (limited to 'gold/archive.h')
-rw-r--r--gold/archive.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gold/archive.h b/gold/archive.h
index 6780398..818bd60 100644
--- a/gold/archive.h
+++ b/gold/archive.h
@@ -100,6 +100,11 @@ class Archive
release()
{ this->input_file_->file().release(); }
+ // Clear uncached views in the underlying file.
+ void
+ clear_uncached_views()
+ { this->input_file_->file().clear_uncached_views(); }
+
// Unlock any nested archives.
void
unlock_nested_archives();
@@ -117,8 +122,8 @@ class Archive
// Get a view into the underlying file.
const unsigned char*
- get_view(off_t start, section_size_type size, bool cache)
- { return this->input_file_->file().get_view(start, size, cache); }
+ get_view(off_t start, section_size_type size, bool aligned, bool cache)
+ { return this->input_file_->file().get_view(0, start, size, aligned, cache); }
// Read the archive symbol map.
void