summaryrefslogtreecommitdiff
path: root/Libraries/LibELF/Image.cpp
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-01-09 11:03:42 +0200
committerAndreas Kling <kling@serenityos.org>2021-01-09 10:56:04 +0100
commit399091dec3585a23cc36fcfb99e5012fa7d340d3 (patch)
tree08f81b2bd02afc79409c853c75420396f6fe4b5e /Libraries/LibELF/Image.cpp
parenta4b74cba0b17b69ed4de9478723076097b102663 (diff)
downloadserenity-399091dec3585a23cc36fcfb99e5012fa7d340d3.zip
LibELF: Fix cached sorted symbols in ELF::Image
Previously, we didn't set the 'symbol' field of SortedSymbol objects in some code paths that populate the sorted symbol cache.
Diffstat (limited to 'Libraries/LibELF/Image.cpp')
-rw-r--r--Libraries/LibELF/Image.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibELF/Image.cpp b/Libraries/LibELF/Image.cpp
index 137f62b841..54fabf8411 100644
--- a/Libraries/LibELF/Image.cpp
+++ b/Libraries/LibELF/Image.cpp
@@ -372,7 +372,7 @@ String Image::symbolicate(u32 address, u32* out_offset) const
if (m_sorted_symbols.is_empty()) {
m_sorted_symbols.ensure_capacity(symbol_count);
for_each_symbol([this](auto& symbol) {
- m_sorted_symbols.append({ symbol.value(), symbol.name(), {}, {} });
+ m_sorted_symbols.append({ symbol.value(), symbol.name(), {}, symbol });
return IterationDecision::Continue;
});
quick_sort(m_sorted_symbols, [](auto& a, auto& b) {