diff options
Diffstat (limited to 'Userland/Libraries/LibELF/DynamicObject.cpp')
-rw-r--r-- | Userland/Libraries/LibELF/DynamicObject.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Userland/Libraries/LibELF/DynamicObject.cpp b/Userland/Libraries/LibELF/DynamicObject.cpp index a9e26fc0d7..f56b1b6aea 100644 --- a/Userland/Libraries/LibELF/DynamicObject.cpp +++ b/Userland/Libraries/LibELF/DynamicObject.cpp @@ -135,6 +135,15 @@ void DynamicObject::parse() case DT_RELCOUNT: m_number_of_relocations = entry.val(); break; + case DT_RELR: + m_relr_relocation_table_offset = entry.ptr() - m_elf_base_address.get(); + break; + case DT_RELRSZ: + m_size_of_relr_relocation_table = entry.val(); + break; + case DT_RELRENT: + m_size_of_relr_relocations_entry = entry.val(); + break; case DT_FLAGS: m_dt_flags = entry.val(); break; @@ -236,6 +245,11 @@ DynamicObject::RelocationSection DynamicObject::plt_relocation_section() const return RelocationSection(Section(*this, m_plt_relocation_offset_location, m_size_of_plt_relocation_entry_list, m_size_of_relocation_entry, "DT_JMPREL"sv), false); } +DynamicObject::Section DynamicObject::relr_relocation_section() const +{ + return Section(*this, m_relr_relocation_table_offset, m_size_of_relr_relocation_table, m_size_of_relr_relocations_entry, "DT_RELR"sv); +} + ElfW(Half) DynamicObject::program_header_count() const { auto* header = (const ElfW(Ehdr)*)m_base_address.as_ptr(); @@ -431,6 +445,12 @@ const char* DynamicObject::name_for_dtag(ElfW(Sword) d_tag) return "VERNEEDED"; case DT_VERNEEDEDNUM: return "VERNEEDEDNUM"; + case DT_RELR: + return "DT_RELR"; + case DT_RELRSZ: + return "DT_RELRSZ"; + case DT_RELRENT: + return "DT_RELRENT"; default: return "??"; } |