mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:37:46 +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:
parent
a4b74cba0b
commit
399091dec3
1 changed files with 1 additions and 1 deletions
|
@ -372,7 +372,7 @@ String Image::symbolicate(u32 address, u32* out_offset) const
|
||||||
if (m_sorted_symbols.is_empty()) {
|
if (m_sorted_symbols.is_empty()) {
|
||||||
m_sorted_symbols.ensure_capacity(symbol_count);
|
m_sorted_symbols.ensure_capacity(symbol_count);
|
||||||
for_each_symbol([this](auto& symbol) {
|
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;
|
return IterationDecision::Continue;
|
||||||
});
|
});
|
||||||
quick_sort(m_sorted_symbols, [](auto& a, auto& b) {
|
quick_sort(m_sorted_symbols, [](auto& a, auto& b) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue