aboutsummaryrefslogtreecommitdiff
path: root/gold/stringpool.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/stringpool.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/stringpool.h')
-rw-r--r--gold/stringpool.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gold/stringpool.h b/gold/stringpool.h
index 93e1ec8..0da7921 100644
--- a/gold/stringpool.h
+++ b/gold/stringpool.h
@@ -127,17 +127,17 @@ class Stringpool_template
// Get the offset of the string S in the string table. This returns
// the offset in bytes, not in units of Stringpool_char. This may
// only be called after set_string_offsets has been called.
- off_t
+ section_offset_type
get_offset(const Stringpool_char* s) const;
// Get the offset of the string S in the string table.
- off_t
+ section_offset_type
get_offset(const std::basic_string<Stringpool_char>& s) const
{ return this->get_offset(s.c_str()); }
// Get the size of the string table. This returns the number of
// bytes, not in units of Stringpool_char.
- off_t
+ section_size_type
get_strtab_size() const
{
gold_assert(this->strtab_size_ != 0);
@@ -153,7 +153,7 @@ class Stringpool_template
// specified size. buffer_size should be at least
// get_strtab_size().
void
- write_to_buffer(unsigned char* buffer, size_t buffer_size);
+ write_to_buffer(unsigned char* buffer, section_size_type buffer_size);
// Dump statistical information to stderr.
void
@@ -247,7 +247,7 @@ class Stringpool_template
// table offsets. We only use the offsets if we turn this into an
// string table section.
- typedef std::pair<Key, off_t> Hashval;
+ typedef std::pair<Key, section_offset_type> Hashval;
typedef Unordered_map<Hashkey, Hashval, Stringpool_hash,
Stringpool_eq> String_set_type;
@@ -270,7 +270,7 @@ class Stringpool_template
// List of buffers.
Stringdata_list strings_;
// Size of string table.
- off_t strtab_size_;
+ section_size_type strtab_size_;
// Next Stringdata index.
unsigned int next_index_;
// Next key value for a string we don't copy.