diff options
author | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-02-24 04:52:46 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-24 14:38:31 +0100 |
commit | 141e6724d19165dcbb1894257aafa1e525021b0c (patch) | |
tree | 6fe5fa9631cf5f0418be84c251abf27a2ceb5191 /Userland/Libraries/LibELF | |
parent | 31e1b08e1587fad0fdc176a6a5d8231d1386a21e (diff) | |
download | serenity-141e6724d19165dcbb1894257aafa1e525021b0c.zip |
LibELF: Use StringView literal syntax to build section names.
Diffstat (limited to 'Userland/Libraries/LibELF')
-rw-r--r-- | Userland/Libraries/LibELF/DynamicObject.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibELF/DynamicObject.h b/Userland/Libraries/LibELF/DynamicObject.h index 075b176508..2f2b2972e7 100644 --- a/Userland/Libraries/LibELF/DynamicObject.h +++ b/Userland/Libraries/LibELF/DynamicObject.h @@ -219,9 +219,8 @@ public: HashSection hash_section() const { - auto section_name = m_hash_type == HashType::SYSV - ? StringView { "DT_HASH", 7 } - : StringView { "DT_GNU_HASH", 11 }; + auto section_name = m_hash_type == HashType::SYSV ? "DT_HASH"sv : "DT_GNU_HASH"sv; + return HashSection(Section(*this, m_hash_table_offset, 0, 0, section_name), m_hash_type); } |