1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 00:17:36 +00:00

LibELF: Avoid calculating symbol hashes when we don't need them

This commit is contained in:
Gunnar Beutner 2021-04-22 09:16:17 +02:00 committed by Andreas Kling
parent 39d34fb1f1
commit f74b8a2d1f
4 changed files with 44 additions and 15 deletions

View file

@ -125,7 +125,7 @@ bool DynamicLoader::validate()
void* DynamicLoader::symbol_for_name(const StringView& name)
{
auto result = m_dynamic_object->hash_section().lookup_symbol(name, compute_gnu_hash(name), compute_sysv_hash(name));
auto result = m_dynamic_object->hash_section().lookup_symbol(name);
if (!result.has_value())
return nullptr;
auto symbol = result.value();