mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
Kernel+LibELF: Don't demangle symbols in the kernel
Instead we should just generate kernel.map in such a way that it already contains demangled symbols.
This commit is contained in:
parent
8e8a5680d5
commit
67f0c0d5f0
7 changed files with 12 additions and 10 deletions
|
@ -289,6 +289,7 @@ StringView Image::Symbol::raw_data() const
|
|||
return { section.raw_data() + (value() - section.address()), size() };
|
||||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
Optional<Image::Symbol> Image::find_demangled_function(const StringView& name) const
|
||||
{
|
||||
Optional<Image::Symbol> found;
|
||||
|
@ -309,6 +310,7 @@ Optional<Image::Symbol> Image::find_demangled_function(const StringView& name) c
|
|||
});
|
||||
return found;
|
||||
}
|
||||
#endif
|
||||
|
||||
Image::SortedSymbol* Image::find_sorted_symbol(FlatPtr address) const
|
||||
{
|
||||
|
@ -355,6 +357,7 @@ NEVER_INLINE void Image::sort_symbols() const
|
|||
});
|
||||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
String Image::symbolicate(u32 address, u32* out_offset) const
|
||||
{
|
||||
auto symbol_count = this->symbol_count();
|
||||
|
@ -381,5 +384,6 @@ String Image::symbolicate(u32 address, u32* out_offset) const
|
|||
}
|
||||
return String::formatted("{} +{:#x}", demangled_name, address - symbol->address);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // end namespace ELF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue