aboutsummaryrefslogtreecommitdiff
path: root/gold/fileread.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-12-18 00:48:04 +0000
committerIan Lance Taylor <iant@google.com>2007-12-18 00:48:04 +0000
commit8383303e0acce6e4332e2a2097b832e2deb880ec (patch)
tree6ccbc99caa33528817ffef492de98dfd19262563 /gold/fileread.h
parent3d372cd7a1b4639eed8fc062829a97b67a1342bf (diff)
downloadfsf-binutils-gdb-8383303e0acce6e4332e2a2097b832e2deb880ec.zip
fsf-binutils-gdb-8383303e0acce6e4332e2a2097b832e2deb880ec.tar.gz
fsf-binutils-gdb-8383303e0acce6e4332e2a2097b832e2deb880ec.tar.bz2
Add section_size_type and section_offset_type, use them to replace a
lot of instances of off_t.
Diffstat (limited to 'gold/fileread.h')
-rw-r--r--gold/fileread.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/gold/fileread.h b/gold/fileread.h
index fd9b1ba..088a76b 100644
--- a/gold/fileread.h
+++ b/gold/fileread.h
@@ -110,7 +110,7 @@ class File_read
// to get_view, read, or get_lasting_view which retrieve the same
// data.
const unsigned char*
- get_view(off_t start, off_t size, bool cache);
+ get_view(off_t start, section_size_type size, bool cache);
// Read data from the file into the buffer P starting at file offset
// START for SIZE bytes.
@@ -124,7 +124,7 @@ class File_read
// error if we can not read enough data from the file. The CACHE
// parameter is as in get_view.
File_view*
- get_lasting_view(off_t start, off_t size, bool cache);
+ get_lasting_view(off_t start, section_size_type size, bool cache);
// Dump statistical information to stderr.
static void
@@ -151,8 +151,8 @@ class File_read
class View
{
public:
- View(off_t start, off_t size, const unsigned char* data, bool cache,
- bool mapped)
+ View(off_t start, section_size_type size, const unsigned char* data,
+ bool cache, bool mapped)
: start_(start), size_(size), data_(data), lock_count_(0),
cache_(cache), mapped_(mapped)
{ }
@@ -163,7 +163,7 @@ class File_read
start() const
{ return this->start_; }
- off_t
+ section_size_type
size() const
{ return this->size_; }
@@ -193,7 +193,7 @@ class File_read
View& operator=(const View&);
off_t start_;
- off_t size_;
+ section_size_type size_;
const unsigned char* data_;
int lock_count_;
bool cache_;
@@ -205,7 +205,7 @@ class File_read
// Find a view into the file.
View*
- find_view(off_t start, off_t size) const;
+ find_view(off_t start, section_size_type size) const;
// Read data from the file into a buffer.
void
@@ -213,7 +213,7 @@ class File_read
// Find or make a view into the file.
View*
- find_or_make_view(off_t start, off_t size, bool cache);
+ find_or_make_view(off_t start, section_size_type size, bool cache);
// Clear the file views.
void