+ // A reloc against the STT_SECTION symbol of an output section.
+ // OS is the Output_section that the relocation refers to; OD is
+ // the Output_data object being relocated.
+
+ void
+ add_output_section(Output_section* os, unsigned int type,
+ Output_data* od, Address address)
+ { this->add(od, Output_reloc_type(os, type, od, address, false)); }
+
+ void
+ add_output_section(Output_section* os, unsigned int type, Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address)
+ { this->add(od, Output_reloc_type(os, type, relobj, shndx, address, false)); }
+
+ void
+ add_output_section_generic(Output_section* os, unsigned int type,
+ Output_data* od, uint64_t address,
+ uint64_t addend)
+ {
+ gold_assert(addend == 0);
+ this->add(od, Output_reloc_type(os, type, od,
+ convert_types<Address, uint64_t>(address),
+ false));
+ }
+
+ void
+ add_output_section_generic(Output_section* os, unsigned int type,
+ Output_data* od, Relobj* relobj,
+ unsigned int shndx, uint64_t address,
+ uint64_t addend)
+ {
+ gold_assert(addend == 0);
+ Sized_relobj<size, big_endian>* sized_relobj =
+ static_cast<Sized_relobj<size, big_endian>*>(relobj);
+ this->add(od, Output_reloc_type(os, type, sized_relobj, shndx,
+ convert_types<Address, uint64_t>(address),
+ false));
+ }
+
+ // As above, but the reloc TYPE is relative
+
+ void
+ add_output_section_relative(Output_section* os, unsigned int type,
+ Output_data* od, Address address)
+ { this->add(od, Output_reloc_type(os, type, od, address, true)); }
+
+ void
+ add_output_section_relative(Output_section* os, unsigned int type,
+ Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address)
+ { this->add(od, Output_reloc_type(os, type, relobj, shndx, address, true)); }
+
+ // Add an absolute relocation.
+
+ void
+ add_absolute(unsigned int type, Output_data* od, Address address)
+ { this->add(od, Output_reloc_type(type, od, address, false)); }
+
+ void
+ add_absolute(unsigned int type, Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address)
+ { this->add(od, Output_reloc_type(type, relobj, shndx, address, false)); }
+
+ // Add a relative relocation
+
+ void
+ add_relative(unsigned int type, Output_data* od, Address address)
+ { this->add(od, Output_reloc_type(type, od, address, true)); }
+
+ void
+ add_relative(unsigned int type, Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address)
+ { this->add(od, Output_reloc_type(type, relobj, shndx, address, true)); }
+
+ // Add a target specific relocation. A target which calls this must
+ // define the reloc_symbol_index and reloc_addend virtual functions.
+
+ void
+ add_target_specific(unsigned int type, void* arg, Output_data* od,
+ Address address)
+ { this->add(od, Output_reloc_type(type, arg, od, address)); }
+
+ void
+ add_target_specific(unsigned int type, void* arg, Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address)
+ { this->add(od, Output_reloc_type(type, arg, relobj, shndx, address)); }
+};
+
+// The SHT_RELA version of Output_data_reloc.
+
+template<bool dynamic, int size, bool big_endian>
+class Output_data_reloc<elfcpp::SHT_RELA, dynamic, size, big_endian>
+ : public Output_data_reloc_base<elfcpp::SHT_RELA, dynamic, size, big_endian>
+{
+ private:
+ typedef Output_data_reloc_base<elfcpp::SHT_RELA, dynamic, size,
+ big_endian> Base;
+
+ public:
+ typedef typename Base::Output_reloc_type Output_reloc_type;
+ typedef typename Output_reloc_type::Address Address;
+ typedef typename Output_reloc_type::Addend Addend;
+
+ Output_data_reloc(bool sr)
+ : Output_data_reloc_base<elfcpp::SHT_RELA, dynamic, size, big_endian>(sr)
+ { }
+
+ // Add a reloc against a global symbol.
+
+ void
+ add_global(Symbol* gsym, unsigned int type, Output_data* od,
+ Address address, Addend addend)
+ {
+ this->add(od, Output_reloc_type(gsym, type, od, address, addend,
+ false, false, false));
+ }
+
+ void
+ add_global(Symbol* gsym, unsigned int type, Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address,
+ Addend addend)
+ {
+ this->add(od, Output_reloc_type(gsym, type, relobj, shndx, address,
+ addend, false, false, false));
+ }
+
+ void
+ add_global_generic(Symbol* gsym, unsigned int type, Output_data* od,
+ uint64_t address, uint64_t addend)
+ {
+ this->add(od, Output_reloc_type(gsym, type, od,
+ convert_types<Address, uint64_t>(address),
+ convert_types<Addend, uint64_t>(addend),
+ false, false, false));
+ }
+
+ void
+ add_global_generic(Symbol* gsym, unsigned int type, Output_data* od,
+ Relobj* relobj, unsigned int shndx, uint64_t address,
+ uint64_t addend)
+ {
+ Sized_relobj<size, big_endian>* sized_relobj =
+ static_cast<Sized_relobj<size, big_endian>*>(relobj);
+ this->add(od, Output_reloc_type(gsym, type, sized_relobj, shndx,
+ convert_types<Address, uint64_t>(address),
+ convert_types<Addend, uint64_t>(addend),
+ false, false, false));
+ }
+
+ // Add a RELATIVE reloc against a global symbol. The final output
+ // relocation will not reference the symbol, but we must keep the symbol
+ // information long enough to set the addend of the relocation correctly
+ // when it is written.
+
+ void
+ add_global_relative(Symbol* gsym, unsigned int type, Output_data* od,
+ Address address, Addend addend, bool use_plt_offset)
+ {
+ this->add(od, Output_reloc_type(gsym, type, od, address, addend, true,
+ true, use_plt_offset));
+ }
+
+ void
+ add_global_relative(Symbol* gsym, unsigned int type, Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address, Addend addend,
+ bool use_plt_offset)
+ {
+ this->add(od, Output_reloc_type(gsym, type, relobj, shndx, address,
+ addend, true, true, use_plt_offset));
+ }
+
+ // Add a global relocation which does not use a symbol for the relocation,
+ // but which gets its addend from a symbol.
+
+ void
+ add_symbolless_global_addend(Symbol* gsym, unsigned int type, Output_data* od,
+ Address address, Addend addend)
+ {
+ this->add(od, Output_reloc_type(gsym, type, od, address, addend,
+ false, true, false));
+ }
+
+ void
+ add_symbolless_global_addend(Symbol* gsym, unsigned int type,
+ Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address,
+ Addend addend)
+ {
+ this->add(od, Output_reloc_type(gsym, type, relobj, shndx, address,
+ addend, false, true, false));
+ }
+
+ // Add a reloc against a local symbol.
+
+ void
+ add_local(Sized_relobj<size, big_endian>* relobj,
+ unsigned int local_sym_index, unsigned int type,
+ Output_data* od, Address address, Addend addend)
+ {
+ this->add(od, Output_reloc_type(relobj, local_sym_index, type, od, address,
+ addend, false, false, false, false));
+ }
+
+ void
+ add_local(Sized_relobj<size, big_endian>* relobj,
+ unsigned int local_sym_index, unsigned int type,
+ Output_data* od, unsigned int shndx, Address address,
+ Addend addend)
+ {
+ this->add(od, Output_reloc_type(relobj, local_sym_index, type, shndx,
+ address, addend, false, false, false,
+ false));
+ }
+
+ void
+ add_local_generic(Relobj* relobj, unsigned int local_sym_index,
+ unsigned int type, Output_data* od, uint64_t address,
+ uint64_t addend)
+ {
+ Sized_relobj<size, big_endian>* sized_relobj =
+ static_cast<Sized_relobj<size, big_endian> *>(relobj);
+ this->add(od, Output_reloc_type(sized_relobj, local_sym_index, type, od,
+ convert_types<Address, uint64_t>(address),
+ convert_types<Addend, uint64_t>(addend),
+ false, false, false, false));
+ }
+
+ void
+ add_local_generic(Relobj* relobj, unsigned int local_sym_index,
+ unsigned int type, Output_data* od, unsigned int shndx,
+ uint64_t address, uint64_t addend)
+ {
+ Sized_relobj<size, big_endian>* sized_relobj =
+ static_cast<Sized_relobj<size, big_endian>*>(relobj);
+ this->add(od, Output_reloc_type(sized_relobj, local_sym_index, type, shndx,
+ convert_types<Address, uint64_t>(address),
+ convert_types<Addend, uint64_t>(addend),
+ false, false, false, false));
+ }
+
+ // Add a RELATIVE reloc against a local symbol.
+
+ void
+ add_local_relative(Sized_relobj<size, big_endian>* relobj,
+ unsigned int local_sym_index, unsigned int type,
+ Output_data* od, Address address, Addend addend,
+ bool use_plt_offset)
+ {
+ this->add(od, Output_reloc_type(relobj, local_sym_index, type, od, address,
+ addend, true, true, false,
+ use_plt_offset));
+ }
+
+ void
+ add_local_relative(Sized_relobj<size, big_endian>* relobj,
+ unsigned int local_sym_index, unsigned int type,
+ Output_data* od, unsigned int shndx, Address address,
+ Addend addend, bool use_plt_offset)
+ {
+ this->add(od, Output_reloc_type(relobj, local_sym_index, type, shndx,
+ address, addend, true, true, false,
+ use_plt_offset));
+ }
+
+ // Add a local relocation which does not use a symbol for the relocation,
+ // but which gets it's addend from a symbol.
+
+ void
+ add_symbolless_local_addend(Sized_relobj<size, big_endian>* relobj,
+ unsigned int local_sym_index, unsigned int type,
+ Output_data* od, Address address, Addend addend)
+ {
+ this->add(od, Output_reloc_type(relobj, local_sym_index, type, od, address,
+ addend, false, true, false, false));
+ }
+
+ void
+ add_symbolless_local_addend(Sized_relobj<size, big_endian>* relobj,
+ unsigned int local_sym_index, unsigned int type,
+ Output_data* od, unsigned int shndx,
+ Address address, Addend addend)
+ {
+ this->add(od, Output_reloc_type(relobj, local_sym_index, type, shndx,
+ address, addend, false, true, false,
+ false));
+ }
+
+ // Add a reloc against a local section symbol. This will be
+ // converted into a reloc against the STT_SECTION symbol of the
+ // output section.
+
+ void
+ add_local_section(Sized_relobj<size, big_endian>* relobj,
+ unsigned int input_shndx, unsigned int type,
+ Output_data* od, Address address, Addend addend)
+ {
+ this->add(od, Output_reloc_type(relobj, input_shndx, type, od, address,
+ addend, false, false, true, false));
+ }
+
+ void
+ add_local_section(Sized_relobj<size, big_endian>* relobj,
+ unsigned int input_shndx, unsigned int type,
+ Output_data* od, unsigned int shndx, Address address,
+ Addend addend)
+ {
+ this->add(od, Output_reloc_type(relobj, input_shndx, type, shndx,
+ address, addend, false, false, true,
+ false));
+ }
+
+ // A reloc against the STT_SECTION symbol of an output section.
+
+ void
+ add_output_section(Output_section* os, unsigned int type, Output_data* od,
+ Address address, Addend addend)
+ { this->add(od, Output_reloc_type(os, type, od, address, addend, false)); }
+
+ void
+ add_output_section(Output_section* os, unsigned int type, Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address, Addend addend)
+ {
+ this->add(od, Output_reloc_type(os, type, relobj, shndx, address,
+ addend, false));
+ }
+
+ void
+ add_output_section_generic(Output_section* os, unsigned int type,
+ Output_data* od, uint64_t address,
+ uint64_t addend)
+ {
+ this->add(od, Output_reloc_type(os, type, od,
+ convert_types<Address, uint64_t>(address),
+ convert_types<Addend, uint64_t>(addend),
+ false));
+ }
+
+ void
+ add_output_section_generic(Output_section* os, unsigned int type,
+ Output_data* od, Relobj* relobj,
+ unsigned int shndx, uint64_t address,
+ uint64_t addend)
+ {
+ Sized_relobj<size, big_endian>* sized_relobj =
+ static_cast<Sized_relobj<size, big_endian>*>(relobj);
+ this->add(od, Output_reloc_type(os, type, sized_relobj, shndx,
+ convert_types<Address, uint64_t>(address),
+ convert_types<Addend, uint64_t>(addend),
+ false));
+ }
+
+ // As above, but the reloc TYPE is relative
+
+ void
+ add_output_section_relative(Output_section* os, unsigned int type,
+ Output_data* od, Address address, Addend addend)
+ { this->add(od, Output_reloc_type(os, type, od, address, addend, true)); }
+
+ void
+ add_output_section_relative(Output_section* os, unsigned int type,
+ Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address,
+ Addend addend)
+ {
+ this->add(od, Output_reloc_type(os, type, relobj, shndx,
+ address, addend, true));
+ }
+
+ // Add an absolute relocation.
+
+ void
+ add_absolute(unsigned int type, Output_data* od, Address address,
+ Addend addend)
+ { this->add(od, Output_reloc_type(type, od, address, addend, false)); }
+
+ void
+ add_absolute(unsigned int type, Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address, Addend addend)
+ {
+ this->add(od, Output_reloc_type(type, relobj, shndx, address, addend,
+ false));
+ }
+
+ // Add a relative relocation
+
+ void
+ add_relative(unsigned int type, Output_data* od, Address address,
+ Addend addend)
+ { this->add(od, Output_reloc_type(type, od, address, addend, true)); }
+
+ void
+ add_relative(unsigned int type, Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address, Addend addend)
+ {
+ this->add(od, Output_reloc_type(type, relobj, shndx, address, addend,
+ true));
+ }
+
+ // Add a target specific relocation. A target which calls this must
+ // define the reloc_symbol_index and reloc_addend virtual functions.
+
+ void
+ add_target_specific(unsigned int type, void* arg, Output_data* od,
+ Address address, Addend addend)
+ { this->add(od, Output_reloc_type(type, arg, od, address, addend)); }
+
+ void
+ add_target_specific(unsigned int type, void* arg, Output_data* od,
+ Sized_relobj<size, big_endian>* relobj,
+ unsigned int shndx, Address address, Addend addend)
+ {
+ this->add(od, Output_reloc_type(type, arg, relobj, shndx, address,
+ addend));
+ }
+};
+
+// Output_relocatable_relocs represents a relocation section in a
+// relocatable link. The actual data is written out in the target
+// hook relocate_relocs. This just saves space for it.
+
+template<int sh_type, int size, bool big_endian>
+class Output_relocatable_relocs : public Output_section_data
+{
+ public:
+ Output_relocatable_relocs(Relocatable_relocs* rr)
+ : Output_section_data(Output_data::default_alignment_for_size(size)),
+ rr_(rr)
+ { }
+
+ void
+ set_final_data_size();
+
+ // Write out the data. There is nothing to do here.
+ void
+ do_write(Output_file*)
+ { }
+
+ // Write to a map file.
+ void
+ do_print_to_mapfile(Mapfile* mapfile) const
+ { mapfile->print_output_data(this, _("** relocs")); }
+
+ private:
+ // The relocs associated with this input section.
+ Relocatable_relocs* rr_;
+};
+
+// Handle a GROUP section.
+
+template<int size, bool big_endian>
+class Output_data_group : public Output_section_data
+{
+ public:
+ // The constructor clears *INPUT_SHNDXES.
+ Output_data_group(Sized_relobj_file<size, big_endian>* relobj,
+ section_size_type entry_count,
+ elfcpp::Elf_Word flags,
+ std::vector<unsigned int>* input_shndxes);
+
+ void
+ do_write(Output_file*);
+
+ // Write to a map file.
+ void
+ do_print_to_mapfile(Mapfile* mapfile) const
+ { mapfile->print_output_data(this, _("** group")); }
+
+ // Set final data size.
+ void
+ set_final_data_size()
+ { this->set_data_size((this->input_shndxes_.size() + 1) * 4); }
+
+ private:
+ // The input object.
+ Sized_relobj_file<size, big_endian>* relobj_;
+ // The group flag word.
+ elfcpp::Elf_Word flags_;
+ // The section indexes of the input sections in this group.
+ std::vector<unsigned int> input_shndxes_;
+};
+
+// Output_data_got is used to manage a GOT. Each entry in the GOT is
+// for one symbol--either a global symbol or a local symbol in an
+// object. The target specific code adds entries to the GOT as
+// needed. The GOT_SIZE template parameter is the size in bits of a
+// GOT entry, typically 32 or 64.
+
+class Output_data_got_base : public Output_section_data_build
+{
+ public:
+ Output_data_got_base(uint64_t align)
+ : Output_section_data_build(align)
+ { }
+
+ Output_data_got_base(off_t data_size, uint64_t align)
+ : Output_section_data_build(data_size, align)
+ { }
+
+ // Reserve the slot at index I in the GOT.
+ void
+ reserve_slot(unsigned int i)
+ { this->do_reserve_slot(i); }
+
+ protected:
+ // Reserve the slot at index I in the GOT.
+ virtual void
+ do_reserve_slot(unsigned int i) = 0;
+};
+
+template<int got_size, bool big_endian>
+class Output_data_got : public Output_data_got_base
+{
+ public:
+ typedef typename elfcpp::Elf_types<got_size>::Elf_Addr Valtype;
+
+ Output_data_got()
+ : Output_data_got_base(Output_data::default_alignment_for_size(got_size)),
+ entries_(), free_list_()
+ { }
+
+ Output_data_got(off_t data_size)
+ : Output_data_got_base(data_size,
+ Output_data::default_alignment_for_size(got_size)),
+ entries_(), free_list_()
+ {
+ // For an incremental update, we have an existing GOT section.
+ // Initialize the list of entries and the free list.
+ this->entries_.resize(data_size / (got_size / 8));
+ this->free_list_.init(data_size, false);
+ }
+
+ // Add an entry for a global symbol to the GOT. Return true if this
+ // is a new GOT entry, false if the symbol was already in the GOT.
+ bool
+ add_global(Symbol* gsym, unsigned int got_type);
+
+ // Like add_global, but use the PLT offset of the global symbol if
+ // it has one.
+ bool
+ add_global_plt(Symbol* gsym, unsigned int got_type);
+
+ // Like add_global, but for a TLS symbol where the value will be
+ // offset using Target::tls_offset_for_global.
+ bool
+ add_global_tls(Symbol* gsym, unsigned int got_type)
+ { return add_global_plt(gsym, got_type); }
+
+ // Add an entry for a global symbol to the GOT, and add a dynamic
+ // relocation of type R_TYPE for the GOT entry.
+ void
+ add_global_with_rel(Symbol* gsym, unsigned int got_type,
+ Output_data_reloc_generic* rel_dyn, unsigned int r_type);
+
+ // Add a pair of entries for a global symbol to the GOT, and add
+ // dynamic relocations of type R_TYPE_1 and R_TYPE_2, respectively.
+ void
+ add_global_pair_with_rel(Symbol* gsym, unsigned int got_type,
+ Output_data_reloc_generic* rel_dyn,
+ unsigned int r_type_1, unsigned int r_type_2);
+
+ // Add an entry for a local symbol to the GOT. This returns true if
+ // this is a new GOT entry, false if the symbol already has a GOT
+ // entry.
+ bool
+ add_local(Relobj* object, unsigned int sym_index, unsigned int got_type);
+
+ // Add an entry for a local symbol plus ADDEND to the GOT. This returns
+ // true if this is a new GOT entry, false if the symbol already has a GOT
+ // entry.
+ bool
+ add_local(Relobj* object, unsigned int sym_index, unsigned int got_type,
+ uint64_t addend);
+
+ // Like add_local, but use the PLT offset of the local symbol if it
+ // has one.
+ bool
+ add_local_plt(Relobj* object, unsigned int sym_index, unsigned int got_type);
+
+ // Like add_local, but for a TLS symbol where the value will be
+ // offset using Target::tls_offset_for_local.
+ bool
+ add_local_tls(Relobj* object, unsigned int sym_index, unsigned int got_type)
+ { return add_local_plt(object, sym_index, got_type); }
+
+ // Add an entry for a local symbol to the GOT, and add a dynamic
+ // relocation of type R_TYPE for the GOT entry.
+ void
+ add_local_with_rel(Relobj* object, unsigned int sym_index,
+ unsigned int got_type, Output_data_reloc_generic* rel_dyn,
+ unsigned int r_type);
+
+ // Add an entry for a local symbol plus ADDEND to the GOT, and add a dynamic
+ // relocation of type R_TYPE for the GOT entry.
+ void
+ add_local_with_rel(Relobj* object, unsigned int sym_index,
+ unsigned int got_type, Output_data_reloc_generic* rel_dyn,
+ unsigned int r_type, uint64_t addend);
+
+ // Add a pair of entries for a local symbol to the GOT, and add
+ // a dynamic relocation of type R_TYPE using the section symbol of
+ // the output section to which input section SHNDX maps, on the first.
+ // The first got entry will have a value of zero, the second the
+ // value of the local symbol.
+ void
+ add_local_pair_with_rel(Relobj* object, unsigned int sym_index,
+ unsigned int shndx, unsigned int got_type,
+ Output_data_reloc_generic* rel_dyn,
+ unsigned int r_type);
+
+ // Add a pair of entries for a local symbol plus ADDEND to the GOT, and add
+ // a dynamic relocation of type R_TYPE using the section symbol of
+ // the output section to which input section SHNDX maps, on the first.
+ // The first got entry will have a value of zero, the second the
+ // value of the local symbol.
+ void
+ add_local_pair_with_rel(Relobj* object, unsigned int sym_index,
+ unsigned int shndx, unsigned int got_type,
+ Output_data_reloc_generic* rel_dyn,
+ unsigned int r_type, uint64_t addend);
+
+ // Add a pair of entries for a local symbol to the GOT, and add
+ // a dynamic relocation of type R_TYPE using STN_UNDEF on the first.
+ // The first got entry will have a value of zero, the second the
+ // value of the local symbol offset by Target::tls_offset_for_local.
+ void
+ add_local_tls_pair(Relobj* object, unsigned int sym_index,
+ unsigned int got_type,
+ Output_data_reloc_generic* rel_dyn,
+ unsigned int r_type);
+
+ // Add a constant to the GOT. This returns the offset of the new
+ // entry from the start of the GOT.
+ unsigned int
+ add_constant(Valtype constant)
+ { return this->add_got_entry(Got_entry(constant)); }
+
+ // Add a pair of constants to the GOT. This returns the offset of
+ // the new entry from the start of the GOT.
+ unsigned int
+ add_constant_pair(Valtype c1, Valtype c2)
+ { return this->add_got_entry_pair(Got_entry(c1), Got_entry(c2)); }
+
+ // Replace GOT entry I with a new constant.
+ void
+ replace_constant(unsigned int i, Valtype constant)
+ {
+ this->replace_got_entry(i, Got_entry(constant));
+ }
+
+ // Reserve a slot in the GOT for a local symbol.
+ void
+ reserve_local(unsigned int i, Relobj* object, unsigned int sym_index,
+ unsigned int got_type);
+
+ // Reserve a slot in the GOT for a global symbol.
+ void
+ reserve_global(unsigned int i, Symbol* gsym, unsigned int got_type);
+
+ protected:
+ // Write out the GOT table.
+ void
+ do_write(Output_file*);
+
+ // Write to a map file.
+ void
+ do_print_to_mapfile(Mapfile* mapfile) const
+ { mapfile->print_output_data(this, _("** GOT")); }
+
+ // Reserve the slot at index I in the GOT.
+ virtual void
+ do_reserve_slot(unsigned int i)
+ { this->free_list_.remove(i * got_size / 8, (i + 1) * got_size / 8); }
+
+ // Return the number of words in the GOT.
+ unsigned int
+ num_entries () const
+ { return this->entries_.size(); }
+
+ // Return the offset into the GOT of GOT entry I.
+ unsigned int
+ got_offset(unsigned int i) const
+ { return i * (got_size / 8); }
+
+ private: