summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibELF/DynamicObject.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-01-25 13:09:08 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-25 18:57:06 +0100
commit41d87342881e795cc97098c6a4012844a2331f5c (patch)
tree85b3f98075c994d49037794d18f5e9edd200839a /Userland/Libraries/LibELF/DynamicObject.h
parenta5de46684b646370077689b9f6d53462fdda0417 (diff)
downloadserenity-41d87342881e795cc97098c6a4012844a2331f5c.zip
LibELF: Use Optional<SymbolLookupResult> as a return type
Instead of storing a "found" state inside the result object.
Diffstat (limited to 'Userland/Libraries/LibELF/DynamicObject.h')
-rw-r--r--Userland/Libraries/LibELF/DynamicObject.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibELF/DynamicObject.h b/Userland/Libraries/LibELF/DynamicObject.h
index 1ce81c9b1e..75e9c5bf52 100644
--- a/Userland/Libraries/LibELF/DynamicObject.h
+++ b/Userland/Libraries/LibELF/DynamicObject.h
@@ -276,18 +276,17 @@ public:
void for_each_initialization_array_function(F f) const;
struct SymbolLookupResult {
- bool found { false };
FlatPtr value { 0 };
FlatPtr address { 0 };
unsigned bind { STB_LOCAL };
const ELF::DynamicObject* dynamic_object { nullptr }; // The object in which the symbol is defined
};
- SymbolLookupResult lookup_symbol(const char* name) const;
+ Optional<SymbolLookupResult> lookup_symbol(const char* name) const;
// Will be called from _fixup_plt_entry, as part of the PLT trampoline
Elf32_Addr patch_plt_entry(u32 relocation_offset);
- SymbolLookupResult lookup_symbol(const ELF::DynamicObject::Symbol& symbol) const;
+ Optional<SymbolLookupResult> lookup_symbol(const ELF::DynamicObject::Symbol&) const;
bool elf_is_dynamic() const { return m_is_elf_dynamic; }