mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 14:59:31 +08:00
Move Stringpool offsets into a chunked_vector indexed by keys.
This commit is contained in:
@ -520,12 +520,13 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Stringpool::Key key;
|
||||||
const Char_type* str = this->stringpool_.add_with_length(p, pl - p, true,
|
const Char_type* str = this->stringpool_.add_with_length(p, pl - p, true,
|
||||||
NULL);
|
&key);
|
||||||
|
|
||||||
section_size_type bytelen_with_null = ((pl - p) + 1) * sizeof(Char_type);
|
section_size_type bytelen_with_null = ((pl - p) + 1) * sizeof(Char_type);
|
||||||
this->merged_strings_.push_back(Merged_string(object, shndx, i, str,
|
this->merged_strings_.push_back(Merged_string(object, shndx, i, str,
|
||||||
bytelen_with_null));
|
bytelen_with_null, key));
|
||||||
|
|
||||||
p = pl + 1;
|
p = pl + 1;
|
||||||
i += bytelen_with_null;
|
i += bytelen_with_null;
|
||||||
@ -551,10 +552,8 @@ Output_merge_string<Char_type>::finalize_merged_data()
|
|||||||
p != this->merged_strings_.end();
|
p != this->merged_strings_.end();
|
||||||
++p)
|
++p)
|
||||||
{
|
{
|
||||||
size_t charlen_without_null = (p->length / sizeof(Char_type)) - 1;
|
|
||||||
section_offset_type offset =
|
section_offset_type offset =
|
||||||
this->stringpool_.get_offset_with_length(p->string,
|
this->stringpool_.get_offset_from_key(p->stringpool_key);
|
||||||
charlen_without_null);
|
|
||||||
this->add_mapping(p->object, p->shndx, p->offset, p->length, offset);
|
this->add_mapping(p->object, p->shndx, p->offset, p->length, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,12 +279,14 @@ class Output_merge_string : public Output_merge_base
|
|||||||
const Char_type* string;
|
const Char_type* string;
|
||||||
// The length of the string in bytes, including the null terminator.
|
// The length of the string in bytes, including the null terminator.
|
||||||
size_t length;
|
size_t length;
|
||||||
|
// The key in the Stringpool.
|
||||||
|
Stringpool::Key stringpool_key;
|
||||||
|
|
||||||
Merged_string(Relobj *objecta, unsigned int shndxa,
|
Merged_string(Relobj *objecta, unsigned int shndxa,
|
||||||
section_offset_type offseta, const Char_type* stringa,
|
section_offset_type offseta, const Char_type* stringa,
|
||||||
size_t lengtha)
|
size_t lengtha, Stringpool::Key stringpool_keya)
|
||||||
: object(objecta), shndx(shndxa), offset(offseta), string(stringa),
|
: object(objecta), shndx(shndxa), offset(offseta), string(stringa),
|
||||||
length(lengtha)
|
length(lengtha), stringpool_key(stringpool_keya)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ namespace gold
|
|||||||
|
|
||||||
template<typename Stringpool_char>
|
template<typename Stringpool_char>
|
||||||
Stringpool_template<Stringpool_char>::Stringpool_template()
|
Stringpool_template<Stringpool_char>::Stringpool_template()
|
||||||
: string_set_(), strings_(), strtab_size_(0), next_index_(1),
|
: string_set_(), key_to_offset_(), strings_(), strtab_size_(0),
|
||||||
next_uncopied_key_(-1), zero_null_(true)
|
zero_null_(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,6 +49,7 @@ Stringpool_template<Stringpool_char>::clear()
|
|||||||
++p)
|
++p)
|
||||||
delete[] reinterpret_cast<char*>(*p);
|
delete[] reinterpret_cast<char*>(*p);
|
||||||
this->strings_.clear();
|
this->strings_.clear();
|
||||||
|
this->key_to_offset_.clear();
|
||||||
this->string_set_.clear();
|
this->string_set_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,6 +68,8 @@ template<typename Stringpool_char>
|
|||||||
void
|
void
|
||||||
Stringpool_template<Stringpool_char>::reserve(unsigned int n)
|
Stringpool_template<Stringpool_char>::reserve(unsigned int n)
|
||||||
{
|
{
|
||||||
|
this->key_to_offset_.reserve(n);
|
||||||
|
|
||||||
#if defined(HAVE_TR1_UNORDERED_MAP)
|
#if defined(HAVE_TR1_UNORDERED_MAP)
|
||||||
// rehash() implementation is broken in gcc 4.0.3's stl
|
// rehash() implementation is broken in gcc 4.0.3's stl
|
||||||
//this->string_set_.rehash(this->string_set_.size() + n);
|
//this->string_set_.rehash(this->string_set_.size() + n);
|
||||||
@ -180,8 +183,7 @@ Stringpool_template<Stringpool_char>::string_hash(const Stringpool_char* s,
|
|||||||
template<typename Stringpool_char>
|
template<typename Stringpool_char>
|
||||||
const Stringpool_char*
|
const Stringpool_char*
|
||||||
Stringpool_template<Stringpool_char>::add_string(const Stringpool_char* s,
|
Stringpool_template<Stringpool_char>::add_string(const Stringpool_char* s,
|
||||||
size_t len,
|
size_t len)
|
||||||
Key* pkey)
|
|
||||||
{
|
{
|
||||||
// We are in trouble if we've already computed the string offsets.
|
// We are in trouble if we've already computed the string offsets.
|
||||||
gold_assert(this->strtab_size_ == 0);
|
gold_assert(this->strtab_size_ == 0);
|
||||||
@ -218,9 +220,6 @@ Stringpool_template<Stringpool_char>::add_string(const Stringpool_char* s,
|
|||||||
memset(ret + len - sizeof(Stringpool_char), 0,
|
memset(ret + len - sizeof(Stringpool_char), 0,
|
||||||
sizeof(Stringpool_char));
|
sizeof(Stringpool_char));
|
||||||
|
|
||||||
if (pkey != NULL)
|
|
||||||
*pkey = psd->index * key_mult + psd->len;
|
|
||||||
|
|
||||||
psd->len += len;
|
psd->len += len;
|
||||||
|
|
||||||
return reinterpret_cast<const Stringpool_char*>(ret);
|
return reinterpret_cast<const Stringpool_char*>(ret);
|
||||||
@ -233,15 +232,6 @@ Stringpool_template<Stringpool_char>::add_string(const Stringpool_char* s,
|
|||||||
memset(psd->data + len - sizeof(Stringpool_char), 0,
|
memset(psd->data + len - sizeof(Stringpool_char), 0,
|
||||||
sizeof(Stringpool_char));
|
sizeof(Stringpool_char));
|
||||||
psd->len = len;
|
psd->len = len;
|
||||||
psd->index = this->next_index_;
|
|
||||||
++this->next_index_;
|
|
||||||
|
|
||||||
if (pkey != NULL)
|
|
||||||
{
|
|
||||||
*pkey = psd->index * key_mult;
|
|
||||||
// Ensure there was no overflow.
|
|
||||||
gold_assert(*pkey / key_mult == psd->index);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (front)
|
if (front)
|
||||||
this->strings_.push_front(psd);
|
this->strings_.push_front(psd);
|
||||||
@ -270,15 +260,14 @@ Stringpool_template<Stringpool_char>::add_with_length(const Stringpool_char* s,
|
|||||||
{
|
{
|
||||||
typedef std::pair<typename String_set_type::iterator, bool> Insert_type;
|
typedef std::pair<typename String_set_type::iterator, bool> Insert_type;
|
||||||
|
|
||||||
|
const Key k = this->key_to_offset_.size();
|
||||||
|
|
||||||
if (!copy)
|
if (!copy)
|
||||||
{
|
{
|
||||||
// When we don't need to copy the string, we can call insert
|
// When we don't need to copy the string, we can call insert
|
||||||
// directly.
|
// directly.
|
||||||
|
|
||||||
const Key k = this->next_uncopied_key_;
|
std::pair<Hashkey, Hashval> element(Hashkey(s, length), k);
|
||||||
const section_offset_type ozero = 0;
|
|
||||||
std::pair<Hashkey, Hashval> element(Hashkey(s, length),
|
|
||||||
std::make_pair(k, ozero));
|
|
||||||
|
|
||||||
Insert_type ins = this->string_set_.insert(element);
|
Insert_type ins = this->string_set_.insert(element);
|
||||||
|
|
||||||
@ -288,15 +277,15 @@ Stringpool_template<Stringpool_char>::add_with_length(const Stringpool_char* s,
|
|||||||
{
|
{
|
||||||
// We just added the string. The key value has now been
|
// We just added the string. The key value has now been
|
||||||
// used.
|
// used.
|
||||||
--this->next_uncopied_key_;
|
this->key_to_offset_.push_back(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gold_assert(k != p->second.first);
|
gold_assert(k != p->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pkey != NULL)
|
if (pkey != NULL)
|
||||||
*pkey = p->second.first;
|
*pkey = p->second;
|
||||||
return p->first.string;
|
return p->first.string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,17 +299,17 @@ Stringpool_template<Stringpool_char>::add_with_length(const Stringpool_char* s,
|
|||||||
if (p != this->string_set_.end())
|
if (p != this->string_set_.end())
|
||||||
{
|
{
|
||||||
if (pkey != NULL)
|
if (pkey != NULL)
|
||||||
*pkey = p->second.first;
|
*pkey = p->second;
|
||||||
return p->first.string;
|
return p->first.string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Key k;
|
this->key_to_offset_.push_back(0);
|
||||||
hk.string = this->add_string(s, length, &k);
|
|
||||||
|
hk.string = this->add_string(s, length);
|
||||||
// The contents of the string stay the same, so we don't need to
|
// The contents of the string stay the same, so we don't need to
|
||||||
// adjust hk.hash_code or hk.length.
|
// adjust hk.hash_code or hk.length.
|
||||||
|
|
||||||
const section_offset_type ozero = 0;
|
std::pair<Hashkey, Hashval> element(hk, k);
|
||||||
std::pair<Hashkey, Hashval> element(hk, std::make_pair(k, ozero));
|
|
||||||
|
|
||||||
Insert_type ins = this->string_set_.insert(element);
|
Insert_type ins = this->string_set_.insert(element);
|
||||||
gold_assert(ins.second);
|
gold_assert(ins.second);
|
||||||
@ -341,7 +330,7 @@ Stringpool_template<Stringpool_char>::find(const Stringpool_char* s,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (pkey != NULL)
|
if (pkey != NULL)
|
||||||
*pkey = p->second.first;
|
*pkey = p->second;
|
||||||
|
|
||||||
return p->first.string;
|
return p->first.string;
|
||||||
}
|
}
|
||||||
@ -423,11 +412,12 @@ Stringpool_template<Stringpool_char>::set_string_offsets()
|
|||||||
curr != this->string_set_.end();
|
curr != this->string_set_.end();
|
||||||
curr++)
|
curr++)
|
||||||
{
|
{
|
||||||
|
section_offset_type* poff = &this->key_to_offset_[curr->second];
|
||||||
if (this->zero_null_ && curr->first.string[0] == 0)
|
if (this->zero_null_ && curr->first.string[0] == 0)
|
||||||
curr->second.second = 0;
|
*poff = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
curr->second.second = offset;
|
*poff = offset;
|
||||||
offset += (curr->first.length + 1) * charsize;
|
offset += (curr->first.length + 1) * charsize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -446,27 +436,30 @@ Stringpool_template<Stringpool_char>::set_string_offsets()
|
|||||||
|
|
||||||
std::sort(v.begin(), v.end(), Stringpool_sort_comparison());
|
std::sort(v.begin(), v.end(), Stringpool_sort_comparison());
|
||||||
|
|
||||||
|
section_offset_type last_offset = -1;
|
||||||
for (typename std::vector<Stringpool_sort_info>::iterator last = v.end(),
|
for (typename std::vector<Stringpool_sort_info>::iterator last = v.end(),
|
||||||
curr = v.begin();
|
curr = v.begin();
|
||||||
curr != v.end();
|
curr != v.end();
|
||||||
last = curr++)
|
last = curr++)
|
||||||
{
|
{
|
||||||
|
section_offset_type this_offset;
|
||||||
if (this->zero_null_ && (*curr)->first.string[0] == 0)
|
if (this->zero_null_ && (*curr)->first.string[0] == 0)
|
||||||
(*curr)->second.second = 0;
|
this_offset = 0;
|
||||||
else if (last != v.end()
|
else if (last != v.end()
|
||||||
&& is_suffix((*curr)->first.string,
|
&& is_suffix((*curr)->first.string,
|
||||||
(*curr)->first.length,
|
(*curr)->first.length,
|
||||||
(*last)->first.string,
|
(*last)->first.string,
|
||||||
(*last)->first.length))
|
(*last)->first.length))
|
||||||
(*curr)->second.second = ((*last)->second.second
|
this_offset = (last_offset
|
||||||
+ (((*last)->first.length
|
+ (((*last)->first.length - (*curr)->first.length)
|
||||||
- (*curr)->first.length)
|
|
||||||
* charsize));
|
* charsize));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
(*curr)->second.second = offset;
|
this_offset = offset;
|
||||||
offset += ((*curr)->first.length + 1) * charsize;
|
offset += ((*curr)->first.length + 1) * charsize;
|
||||||
}
|
}
|
||||||
|
this->key_to_offset_[(*curr)->second] = this_offset;
|
||||||
|
last_offset = this_offset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -494,7 +487,7 @@ Stringpool_template<Stringpool_char>::get_offset_with_length(
|
|||||||
Hashkey hk(s, length);
|
Hashkey hk(s, length);
|
||||||
typename String_set_type::const_iterator p = this->string_set_.find(hk);
|
typename String_set_type::const_iterator p = this->string_set_.find(hk);
|
||||||
if (p != this->string_set_.end())
|
if (p != this->string_set_.end())
|
||||||
return p->second.second;
|
return this->key_to_offset_[p->second];
|
||||||
gold_unreachable();
|
gold_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -515,9 +508,10 @@ Stringpool_template<Stringpool_char>::write_to_buffer(
|
|||||||
++p)
|
++p)
|
||||||
{
|
{
|
||||||
const int len = (p->first.length + 1) * sizeof(Stringpool_char);
|
const int len = (p->first.length + 1) * sizeof(Stringpool_char);
|
||||||
gold_assert(static_cast<section_size_type>(p->second.second) + len
|
const section_offset_type offset = this->key_to_offset_[p->second];
|
||||||
|
gold_assert(static_cast<section_size_type>(offset) + len
|
||||||
<= this->strtab_size_);
|
<= this->strtab_size_);
|
||||||
memcpy(buffer + p->second.second, p->first.string, len);
|
memcpy(buffer + offset, p->first.string, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#ifndef GOLD_STRINGPOOL_H
|
#ifndef GOLD_STRINGPOOL_H
|
||||||
#define GOLD_STRINGPOOL_H
|
#define GOLD_STRINGPOOL_H
|
||||||
@ -56,8 +57,9 @@ class Output_file;
|
|||||||
// single zero byte, as required for SHT_STRTAB sections. This
|
// single zero byte, as required for SHT_STRTAB sections. This
|
||||||
// conversion is only permitted after all strings have been added to
|
// conversion is only permitted after all strings have been added to
|
||||||
// the Stringpool. After doing this conversion, you can ask for the
|
// the Stringpool. After doing this conversion, you can ask for the
|
||||||
// offset of any string in the stringpool in the string table, and you
|
// offset of any string (or any key) in the stringpool in the string
|
||||||
// can write the resulting string table to an output file.
|
// table, and you can write the resulting string table to an output
|
||||||
|
// file.
|
||||||
|
|
||||||
// When a Stringpool is turned into a string table, then as an
|
// When a Stringpool is turned into a string table, then as an
|
||||||
// optimization it will reuse string suffixes to avoid duplicating
|
// optimization it will reuse string suffixes to avoid duplicating
|
||||||
@ -65,6 +67,79 @@ class Output_file;
|
|||||||
// string "abc" will be stored, and "bc" will be represented by an
|
// string "abc" will be stored, and "bc" will be represented by an
|
||||||
// offset into the middle of the string "abc".
|
// offset into the middle of the string "abc".
|
||||||
|
|
||||||
|
|
||||||
|
// A simple chunked vector class--this is a subset of std::vector
|
||||||
|
// which stores memory in chunks. We don't provide iterators, because
|
||||||
|
// we don't need them.
|
||||||
|
|
||||||
|
template<typename Element>
|
||||||
|
class Chunked_vector
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Chunked_vector()
|
||||||
|
: chunks_()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
// Clear the elements.
|
||||||
|
void
|
||||||
|
clear()
|
||||||
|
{ this->chunks_.clear(); }
|
||||||
|
|
||||||
|
// Reserve elements.
|
||||||
|
void
|
||||||
|
reserve(unsigned int n)
|
||||||
|
{
|
||||||
|
n += chunk_size - 1;
|
||||||
|
while (n >= chunk_size)
|
||||||
|
{
|
||||||
|
this->chunks_.push_back(Element_vector());
|
||||||
|
this->chunks_.back().reserve(chunk_size);
|
||||||
|
n -= chunk_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the number of elements.
|
||||||
|
size_t
|
||||||
|
size() const
|
||||||
|
{
|
||||||
|
if (this->chunks_.empty())
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
return ((this->chunks_.size() - 1) * chunk_size
|
||||||
|
+ this->chunks_.back().size());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Push a new element on the back of the vector.
|
||||||
|
void
|
||||||
|
push_back(const Element& element)
|
||||||
|
{
|
||||||
|
if (this->chunks_.empty() || this->chunks_.back().size() == chunk_size)
|
||||||
|
{
|
||||||
|
this->chunks_.push_back(Element_vector());
|
||||||
|
this->chunks_.back().reserve(chunk_size);
|
||||||
|
}
|
||||||
|
this->chunks_.back().push_back(element);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return a reference to an entry in the vector.
|
||||||
|
Element&
|
||||||
|
operator[](size_t i)
|
||||||
|
{ return this->chunks_[i / chunk_size][i % chunk_size]; }
|
||||||
|
|
||||||
|
const Element&
|
||||||
|
operator[](size_t i) const
|
||||||
|
{ return this->chunks_[i / chunk_size][i % chunk_size]; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
static const unsigned int chunk_size = 8192;
|
||||||
|
|
||||||
|
typedef std::vector<Element> Element_vector;
|
||||||
|
typedef std::vector<Element_vector> Chunk_vector;
|
||||||
|
|
||||||
|
Chunk_vector chunks_;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// Stringpools are implemented in terms of Stringpool_template, which
|
// Stringpools are implemented in terms of Stringpool_template, which
|
||||||
// is generalized on the type of character used for the strings. Most
|
// is generalized on the type of character used for the strings. Most
|
||||||
// uses will want the Stringpool type which uses char. Other cases
|
// uses will want the Stringpool type which uses char. Other cases
|
||||||
@ -141,6 +216,14 @@ class Stringpool_template
|
|||||||
section_offset_type
|
section_offset_type
|
||||||
get_offset_with_length(const Stringpool_char* s, size_t length) const;
|
get_offset_with_length(const Stringpool_char* s, size_t length) const;
|
||||||
|
|
||||||
|
// Get the offset of the string with key K.
|
||||||
|
section_offset_type
|
||||||
|
get_offset_from_key(Key k) const
|
||||||
|
{
|
||||||
|
gold_assert(k < this->key_to_offset_.size());
|
||||||
|
return this->key_to_offset_[k];
|
||||||
|
}
|
||||||
|
|
||||||
// Get the size of the string table. This returns the number of
|
// Get the size of the string table. This returns the number of
|
||||||
// bytes, not in units of Stringpool_char.
|
// bytes, not in units of Stringpool_char.
|
||||||
section_size_type
|
section_size_type
|
||||||
@ -189,15 +272,13 @@ class Stringpool_template
|
|||||||
size_t len;
|
size_t len;
|
||||||
// Allocated size of buffer.
|
// Allocated size of buffer.
|
||||||
size_t alc;
|
size_t alc;
|
||||||
// Buffer index.
|
|
||||||
unsigned int index;
|
|
||||||
// Buffer.
|
// Buffer.
|
||||||
char data[1];
|
char data[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Copy a string into the buffers, returning a canonical string.
|
// Copy a string into the buffers, returning a canonical string.
|
||||||
const Stringpool_char*
|
const Stringpool_char*
|
||||||
add_string(const Stringpool_char*, size_t, Key*);
|
add_string(const Stringpool_char*, size_t);
|
||||||
|
|
||||||
// Return whether s1 is a suffix of s2.
|
// Return whether s1 is a suffix of s2.
|
||||||
static bool
|
static bool
|
||||||
@ -249,11 +330,9 @@ class Stringpool_template
|
|||||||
operator()(const Hashkey&, const Hashkey&) const;
|
operator()(const Hashkey&, const Hashkey&) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// The hash table is a map from strings to a pair of Key and string
|
// The hash table is a map from strings to Keys.
|
||||||
// table offsets. We only use the offsets if we turn this into an
|
|
||||||
// string table section.
|
|
||||||
|
|
||||||
typedef std::pair<Key, section_offset_type> Hashval;
|
typedef Key Hashval;
|
||||||
|
|
||||||
typedef Unordered_map<Hashkey, Hashval, Stringpool_hash,
|
typedef Unordered_map<Hashkey, Hashval, Stringpool_hash,
|
||||||
Stringpool_eq> String_set_type;
|
Stringpool_eq> String_set_type;
|
||||||
@ -268,19 +347,21 @@ class Stringpool_template
|
|||||||
operator()(const Stringpool_sort_info&, const Stringpool_sort_info&) const;
|
operator()(const Stringpool_sort_info&, const Stringpool_sort_info&) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Keys map to offsets via a Chunked_vector. We only use the
|
||||||
|
// offsets if we turn this into an string table section.
|
||||||
|
typedef Chunked_vector<section_offset_type> Key_to_offset;
|
||||||
|
|
||||||
// List of Stringdata structures.
|
// List of Stringdata structures.
|
||||||
typedef std::list<Stringdata*> Stringdata_list;
|
typedef std::list<Stringdata*> Stringdata_list;
|
||||||
|
|
||||||
// Mapping from const char* to namepool entry.
|
// Mapping from const char* to namepool entry.
|
||||||
String_set_type string_set_;
|
String_set_type string_set_;
|
||||||
|
// Mapping from Key to string table offset.
|
||||||
|
Key_to_offset key_to_offset_;
|
||||||
// List of buffers.
|
// List of buffers.
|
||||||
Stringdata_list strings_;
|
Stringdata_list strings_;
|
||||||
// Size of string table.
|
// Size of string table.
|
||||||
section_size_type strtab_size_;
|
section_size_type strtab_size_;
|
||||||
// Next Stringdata index.
|
|
||||||
unsigned int next_index_;
|
|
||||||
// Next key value for a string we don't copy.
|
|
||||||
int next_uncopied_key_;
|
|
||||||
// Whether to reserve offset 0 to hold the null string.
|
// Whether to reserve offset 0 to hold the null string.
|
||||||
bool zero_null_;
|
bool zero_null_;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user