+ // Return the size of each GOT entry. This is only used for
+ // laying out the incremental link info sections. A target needs
+ // to implement this if its GOT size is different.
+
+ virtual unsigned int
+ got_entry_size() const
+ { return size / 8; }
+
+ // Create the GOT and PLT sections for an incremental update.
+ // A target needs to implement this to support incremental linking.
+
+ virtual Output_data_got_base*
+ init_got_plt_for_update(Symbol_table*,
+ Layout*,
+ unsigned int /* got_count */,
+ unsigned int /* plt_count */)
+ { gold_unreachable(); }
+
+ // Reserve a GOT entry for a local symbol, and regenerate any
+ // necessary dynamic relocations.
+ virtual void
+ reserve_local_got_entry(unsigned int /* got_index */,
+ Sized_relobj<size, big_endian>* /* obj */,
+ unsigned int /* r_sym */,
+ unsigned int /* got_type */)
+ { gold_unreachable(); }
+
+ // Reserve a GOT entry for a global symbol, and regenerate any
+ // necessary dynamic relocations.
+ virtual void
+ reserve_global_got_entry(unsigned int /* got_index */, Symbol* /* gsym */,
+ unsigned int /* got_type */)
+ { gold_unreachable(); }
+
+ // Register an existing PLT entry for a global symbol.
+ // A target needs to implement this to support incremental linking.
+
+ virtual void
+ register_global_plt_entry(Symbol_table*, Layout*,
+ unsigned int /* plt_index */,
+ Symbol*)
+ { gold_unreachable(); }
+
+ // Force a COPY relocation for a given symbol.
+ // A target needs to implement this to support incremental linking.
+
+ virtual void
+ emit_copy_reloc(Symbol_table*, Symbol*, Output_section*, off_t)
+ { gold_unreachable(); }
+
+ // Apply an incremental relocation.
+
+ virtual void
+ apply_relocation(const Relocate_info<size, big_endian>* /* relinfo */,
+ typename elfcpp::Elf_types<size>::Elf_Addr /* r_offset */,
+ unsigned int /* r_type */,
+ typename elfcpp::Elf_types<size>::Elf_Swxword /* r_addend */,
+ const Symbol* /* gsym */,
+ unsigned char* /* view */,
+ typename elfcpp::Elf_types<size>::Elf_Addr /* address */,
+ section_size_type /* view_size */)
+ { gold_unreachable(); }
+
+ // Handle target specific gc actions when adding a gc reference from
+ // SRC_OBJ, SRC_SHNDX to a location specified by DST_OBJ, DST_SHNDX
+ // and DST_OFF.
+ void
+ gc_add_reference(Symbol_table* symtab,
+ Relobj* src_obj,
+ unsigned int src_shndx,
+ Relobj* dst_obj,
+ unsigned int dst_shndx,
+ typename elfcpp::Elf_types<size>::Elf_Addr dst_off) const
+ {
+ this->do_gc_add_reference(symtab, src_obj, src_shndx,
+ dst_obj, dst_shndx, dst_off);
+ }
+
+ // Return the r_sym field from a relocation.
+ // Most targets can use the default version of this routine,
+ // but some targets have a non-standard r_info field, and will
+ // need to provide a target-specific version.
+ virtual unsigned int
+ get_r_sym(const unsigned char* preloc) const
+ {
+ // Since REL and RELA relocs share the same structure through
+ // the r_info field, we can just use REL here.
+ elfcpp::Rel<size, big_endian> rel(preloc);
+ return elfcpp::elf_r_sym<size>(rel.get_r_info());
+ }
+