+ // Adjust the output file header before it is written out. VIEW
+ // points to the header in external form. LEN is the length.
+ void
+ adjust_elf_header(unsigned char* view, int len)
+ { return this->do_adjust_elf_header(view, len); }
+
+ // Return address and size to plug into eh_frame FDEs associated with a PLT.
+ void
+ plt_fde_location(const Output_data* plt, unsigned char* oview,
+ uint64_t* address, off_t* len) const
+ { return this->do_plt_fde_location(plt, oview, address, len); }
+
+ // Return whether NAME is a local label name. This is used to implement the
+ // --discard-locals options.
+ bool
+ is_local_label_name(const char* name) const
+ { return this->do_is_local_label_name(name); }
+
+ // Get the symbol index to use for a target specific reloc.
+ unsigned int
+ reloc_symbol_index(void* arg, unsigned int type) const
+ { return this->do_reloc_symbol_index(arg, type); }
+
+ // Get the addend to use for a target specific reloc.
+ uint64_t
+ reloc_addend(void* arg, unsigned int type, uint64_t addend) const
+ { return this->do_reloc_addend(arg, type, addend); }
+
+ // Return the PLT address to use for a global symbol.
+ uint64_t
+ plt_address_for_global(const Symbol* sym) const
+ { return this->do_plt_address_for_global(sym); }
+
+ // Return the PLT address to use for a local symbol.
+ uint64_t
+ plt_address_for_local(const Relobj* object, unsigned int symndx) const
+ { return this->do_plt_address_for_local(object, symndx); }
+
+ // Return the offset to use for the GOT_INDX'th got entry which is
+ // for a local tls symbol specified by OBJECT, SYMNDX.
+ int64_t
+ tls_offset_for_local(const Relobj* object,
+ unsigned int symndx,
+ unsigned int got_indx) const
+ { return do_tls_offset_for_local(object, symndx, got_indx); }
+
+ // Return the offset to use for the GOT_INDX'th got entry which is
+ // for global tls symbol GSYM.
+ int64_t
+ tls_offset_for_global(Symbol* gsym, unsigned int got_indx) const
+ { return do_tls_offset_for_global(gsym, got_indx); }
+
+ // For targets that use function descriptors, if LOC is the location
+ // of a function, modify it to point at the function entry location.
+ void
+ function_location(Symbol_location* loc) const
+ { return do_function_location(loc); }
+
+ // Return whether this target can use relocation types to determine
+ // if a function's address is taken.
+ bool
+ can_check_for_function_pointers() const
+ { return this->do_can_check_for_function_pointers(); }
+
+ // Return whether a relocation to a merged section can be processed
+ // to retrieve the contents.
+ bool
+ can_icf_inline_merge_sections () const
+ { return this->pti_->can_icf_inline_merge_sections; }
+
+ // Whether a section called SECTION_NAME may have function pointers to
+ // sections not eligible for safe ICF folding.
+ virtual bool
+ section_may_have_icf_unsafe_pointers(const char* section_name) const
+ { return this->do_section_may_have_icf_unsafe_pointers(section_name); }
+
+ // Return the base to use for the PC value in an FDE when it is
+ // encoded using DW_EH_PE_datarel. This does not appear to be
+ // documented anywhere, but it is target specific. Any use of
+ // DW_EH_PE_datarel in gcc requires defining a special macro
+ // (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX) to output the value.
+ uint64_t
+ ehframe_datarel_base() const
+ { return this->do_ehframe_datarel_base(); }
+
+ // Return true if a reference to SYM from a reloc at *PRELOC
+ // means that the current function may call an object compiled
+ // without -fsplit-stack. SYM is known to be defined in an object
+ // compiled without -fsplit-stack.
+ bool
+ is_call_to_non_split(const Symbol* sym, const unsigned char* preloc,
+ const unsigned char* view,
+ section_size_type view_size) const
+ { return this->do_is_call_to_non_split(sym, preloc, view, view_size); }
+
+ // A function starts at OFFSET in section SHNDX in OBJECT. That
+ // function was compiled with -fsplit-stack, but it refers to a
+ // function which was compiled without -fsplit-stack. VIEW is a
+ // modifiable view of the section; VIEW_SIZE is the size of the
+ // view. The target has to adjust the function so that it allocates
+ // enough stack.
+ void
+ calls_non_split(Relobj* object, unsigned int shndx,
+ section_offset_type fnoffset, section_size_type fnsize,
+ const unsigned char* prelocs, size_t reloc_count,
+ unsigned char* view, section_size_type view_size,
+ std::string* from, std::string* to) const
+ {
+ this->do_calls_non_split(object, shndx, fnoffset, fnsize,
+ prelocs, reloc_count, view, view_size,
+ from, to);
+ }
+
+ // Make an ELF object.
+ template<int size, bool big_endian>
+ Object*
+ make_elf_object(const std::string& name, Input_file* input_file,
+ off_t offset, const elfcpp::Ehdr<size, big_endian>& ehdr)
+ { return this->do_make_elf_object(name, input_file, offset, ehdr); }
+
+ // Make an output section.
+ Output_section*
+ make_output_section(const char* name, elfcpp::Elf_Word type,
+ elfcpp::Elf_Xword flags)
+ { return this->do_make_output_section(name, type, flags); }
+
+ // Return true if target wants to perform relaxation.
+ bool
+ may_relax() const
+ {
+ // Run the dummy relaxation pass twice if relaxation debugging is enabled.
+ if (is_debugging_enabled(DEBUG_RELAXATION))
+ return true;
+
+ return this->do_may_relax();
+ }
+
+ // Perform a relaxation pass. Return true if layout may be changed.
+ bool
+ relax(int pass, const Input_objects* input_objects, Symbol_table* symtab,
+ Layout* layout, const Task* task)
+ {
+ // Run the dummy relaxation pass twice if relaxation debugging is enabled.
+ if (is_debugging_enabled(DEBUG_RELAXATION))
+ return pass < 2;
+
+ return this->do_relax(pass, input_objects, symtab, layout, task);
+ }
+
+ // Return the target-specific name of attributes section. This is
+ // NULL if a target does not use attributes section or if it uses
+ // the default section name ".gnu.attributes".
+ const char*
+ attributes_section() const
+ { return this->pti_->attributes_section; }
+
+ // Return the vendor name of vendor attributes.
+ const char*
+ attributes_vendor() const
+ { return this->pti_->attributes_vendor; }
+
+ // Whether a section called NAME is an attribute section.
+ bool
+ is_attributes_section(const char* name) const
+ {
+ return ((this->pti_->attributes_section != NULL
+ && strcmp(name, this->pti_->attributes_section) == 0)
+ || strcmp(name, ".gnu.attributes") == 0);
+ }
+
+ // Return a bit mask of argument types for attribute with TAG.
+ int
+ attribute_arg_type(int tag) const
+ { return this->do_attribute_arg_type(tag); }
+
+ // Return the attribute tag of the position NUM in the list of fixed
+ // attributes. Normally there is no reordering and
+ // attributes_order(NUM) == NUM.
+ int
+ attributes_order(int num) const
+ { return this->do_attributes_order(num); }
+
+ // When a target is selected as the default target, we call this method,
+ // which may be used for expensive, target-specific initialization.
+ void
+ select_as_default_target()
+ { this->do_select_as_default_target(); }
+
+ // Return the value to store in the EI_OSABI field in the ELF
+ // header.
+ elfcpp::ELFOSABI
+ osabi() const
+ { return this->osabi_; }
+
+ // Set the value to store in the EI_OSABI field in the ELF header.
+ void
+ set_osabi(elfcpp::ELFOSABI osabi)
+ { this->osabi_ = osabi; }
+
+ // Define target-specific standard symbols.
+ void
+ define_standard_symbols(Symbol_table* symtab, Layout* layout)
+ { this->do_define_standard_symbols(symtab, layout); }
+
+ // Return the output section name to use given an input section
+ // name, or NULL if no target specific name mapping is required.
+ // Set *PLEN to the length of the name if returning non-NULL.
+ const char*
+ output_section_name(const Relobj* relobj,
+ const char* name,
+ size_t* plen) const
+ { return this->do_output_section_name(relobj, name, plen); }
+
+ // Add any special sections for this symbol to the gc work list.
+ void
+ gc_mark_symbol(Symbol_table* symtab, Symbol* sym) const
+ { this->do_gc_mark_symbol(symtab, sym); }
+
+ // Return the name of the entry point symbol.
+ const char*
+ entry_symbol_name() const
+ { return this->pti_->entry_symbol_name; }
+
+ // Return the size in bits of SHT_HASH entry.
+ int
+ hash_entry_size() const
+ { return this->pti_->hash_entry_size; }
+
+ // Return the section type to use for unwind sections.
+ unsigned int
+ unwind_section_type() const
+ { return this->pti_->unwind_section_type; }
+
+ // Whether the target has a custom set_dynsym_indexes method.
+ bool
+ has_custom_set_dynsym_indexes() const
+ { return this->do_has_custom_set_dynsym_indexes(); }
+
+ // Custom set_dynsym_indexes method for a target.
+ unsigned int
+ set_dynsym_indexes(std::vector<Symbol*>* dyn_symbols, unsigned int index,
+ std::vector<Symbol*>* syms, Stringpool* dynpool,
+ Versions* versions, Symbol_table* symtab) const
+ {
+ return this->do_set_dynsym_indexes(dyn_symbols, index, syms, dynpool,
+ versions, symtab);
+ }
+
+ // Get the custom dynamic tag value.
+ unsigned int
+ dynamic_tag_custom_value(elfcpp::DT tag) const
+ { return this->do_dynamic_tag_custom_value(tag); }
+
+ // Adjust the value written to the dynamic symbol table.
+ void
+ adjust_dyn_symbol(const Symbol* sym, unsigned char* view) const
+ { this->do_adjust_dyn_symbol(sym, view); }
+
+ // Return whether to include the section in the link.
+ bool
+ should_include_section(elfcpp::Elf_Word sh_type) const
+ { return this->do_should_include_section(sh_type); }
+
+ // Finalize the target-specific properties in the .note.gnu.property section.
+ void
+ finalize_gnu_properties(Layout* layout) const
+ { this->do_finalize_gnu_properties(layout); }
+