diff options
Diffstat (limited to 'gold/output.cc')
-rw-r--r-- | gold/output.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gold/output.cc b/gold/output.cc index 5b1e601d491..8c27ad49779 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -1224,6 +1224,17 @@ Output_reloc<elfcpp::SHT_RELA, dynamic, size, big_endian>::write( orel.put_r_addend(addend); } +// Write out a Relr relocation. + +template<bool dynamic, int size, bool big_endian> +void +Output_reloc<elfcpp::SHT_RELR, dynamic, size, big_endian>::write( + unsigned char* pov) const +{ + elfcpp::Relr_write<size, big_endian> orel(pov); + orel.put_r_offset(this->rel_.get_address()); +} + // Output_data_reloc_base methods. // Adjust the output section. @@ -1237,6 +1248,8 @@ Output_data_reloc_base<sh_type, dynamic, size, big_endian> os->set_entsize(elfcpp::Elf_sizes<size>::rel_size); else if (sh_type == elfcpp::SHT_RELA) os->set_entsize(elfcpp::Elf_sizes<size>::rela_size); + else if (sh_type == elfcpp::SHT_RELR) + os->set_entsize(elfcpp::Elf_sizes<size>::relr_size); else gold_unreachable(); @@ -5528,6 +5541,26 @@ class Output_data_reloc<elfcpp::SHT_RELA, true, 64, true>; #ifdef HAVE_TARGET_32_LITTLE template +class Output_data_reloc<elfcpp::SHT_RELR, true, 32, false>; +#endif + +#ifdef HAVE_TARGET_32_BIG +template +class Output_data_reloc<elfcpp::SHT_RELR, true, 32, true>; +#endif + +#ifdef HAVE_TARGET_64_LITTLE +template +class Output_data_reloc<elfcpp::SHT_RELR, true, 64, false>; +#endif + +#ifdef HAVE_TARGET_64_BIG +template +class Output_data_reloc<elfcpp::SHT_RELR, true, 64, true>; +#endif + +#ifdef HAVE_TARGET_32_LITTLE +template class Output_relocatable_relocs<elfcpp::SHT_REL, 32, false>; #endif |