1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00

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.
This commit is contained in:
Itamar 2021-01-09 11:03:42 +02:00 committed by Andreas Kling
parent a4b74cba0b
commit 399091dec3

View file

@ -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) {