1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

LibELF: Add Symbol::is_undefined()

This commit is contained in:
Itamar 2021-01-06 21:44:47 +02:00 committed by Andreas Kling
parent f95f15e0bd
commit bb90d961b8
2 changed files with 3 additions and 0 deletions

View file

@ -312,6 +312,8 @@ Optional<Image::Symbol> Image::find_demangled_function(const String& name) const
for_each_symbol([&](const Image::Symbol symbol) {
if (symbol.type() != STT_FUNC)
return IterationDecision::Continue;
if (symbol.is_undefined())
return IterationDecision::Continue;
auto demangled = demangle(symbol.name());
auto index_of_paren = demangled.index_of("(");
if (index_of_paren.has_value()) {