+ get_lasting_view(off_t offset, off_t start, section_size_type size,
+ bool aligned, bool cache);
+
+ // Mark all views as no longer cached.
+ void
+ clear_view_cache_marks();
+
+ // Discard all uncached views. This is normally done by release(),
+ // but not for objects in archives. FIXME: This is a complicated
+ // interface, and it would be nice to have something more automatic.
+ void
+ clear_uncached_views()
+ { this->clear_views(CLEAR_VIEWS_ARCHIVE); }
+
+ // A struct used to do a multiple read.
+ struct Read_multiple_entry
+ {
+ // The file offset of the data to read.
+ off_t file_offset;
+ // The amount of data to read.
+ section_size_type size;
+ // The buffer where the data should be placed.
+ unsigned char* buffer;
+
+ Read_multiple_entry(off_t o, section_size_type s, unsigned char* b)
+ : file_offset(o), size(s), buffer(b)
+ { }
+ };
+
+ typedef std::vector<Read_multiple_entry> Read_multiple;
+
+ // Read a bunch of data from the file into various different
+ // locations. The vector must be sorted by ascending file_offset.
+ // BASE is a base offset to be added to all the offsets in the
+ // vector.
+ void
+ read_multiple(off_t base, const Read_multiple&);
+
+ // Dump statistical information to stderr.
+ static void
+ print_stats();
+
+ // Return the open file descriptor (for plugins).
+ int
+ descriptor()
+ {
+ this->reopen_descriptor();
+ return this->descriptor_;
+ }
+
+ // Return the file last modification time. Calls gold_fatal if the stat
+ // system call failed.
+ Timespec
+ get_mtime();