diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-23 18:53:25 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-23 19:43:44 +0100 |
commit | 46a94a9a9ef62dcdb7034fc99828a4510cfa3275 (patch) | |
tree | dc1a32c76c6e24ddb8c3d8c496d0905e8845cf6e | |
parent | cc00df0f0f4a236424f3f5984040691dbae409d2 (diff) | |
download | serenity-46a94a9a9ef62dcdb7034fc99828a4510cfa3275.zip |
LibELF: Rename lookup_elf_symbol() => lookup_sysv_symbol()
We have two kinds of lookup, SYSV and GNU hash. Both are ELF lookups.
-rw-r--r-- | Userland/Libraries/LibELF/DynamicObject.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibELF/DynamicObject.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibELF/DynamicObject.cpp b/Userland/Libraries/LibELF/DynamicObject.cpp index 7e8774dc2a..af9540f467 100644 --- a/Userland/Libraries/LibELF/DynamicObject.cpp +++ b/Userland/Libraries/LibELF/DynamicObject.cpp @@ -251,7 +251,7 @@ 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")); } -auto DynamicObject::HashSection::lookup_elf_symbol(const StringView& name, u32 hash_value) const -> Optional<Symbol> +auto DynamicObject::HashSection::lookup_sysv_symbol(const StringView& name, u32 hash_value) const -> Optional<Symbol> { u32* hash_table_begin = (u32*)address().as_ptr(); size_t num_buckets = hash_table_begin[0]; diff --git a/Userland/Libraries/LibELF/DynamicObject.h b/Userland/Libraries/LibELF/DynamicObject.h index ee881ac716..b5b309fff7 100644 --- a/Userland/Libraries/LibELF/DynamicObject.h +++ b/Userland/Libraries/LibELF/DynamicObject.h @@ -191,12 +191,12 @@ public: Optional<Symbol> lookup_symbol(const StringView& name, u32 gnu_hash, u32 sysv_hash) const { if (m_hash_type == HashType::SYSV) - return lookup_elf_symbol(name, sysv_hash); + return lookup_sysv_symbol(name, sysv_hash); return lookup_gnu_symbol(name, gnu_hash); } private: - Optional<Symbol> lookup_elf_symbol(const StringView& name, u32 hash) const; + Optional<Symbol> lookup_sysv_symbol(const StringView& name, u32 hash_value) const; Optional<Symbol> lookup_gnu_symbol(const StringView& name, u32 hash) const; HashType m_hash_type {}; |