mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibELF: Set ELF::Loader::m_symbol_count in constructor
Setting it in load() excludes users of ELF::Loader that don't actually call load() but only use the Loader for symbolication purposes. Perhaps the factoring here is not ideal.
This commit is contained in:
parent
c3b6df60b7
commit
8d73355c38
Notes:
sideshowbarker
2024-07-19 03:54:07 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8d73355c383
1 changed files with 2 additions and 2 deletions
|
@ -43,6 +43,8 @@ namespace ELF {
|
|||
Loader::Loader(const u8* buffer, size_t size, bool verbose_logging)
|
||||
: m_image(buffer, size, verbose_logging)
|
||||
{
|
||||
if (m_image.is_valid())
|
||||
m_symbol_count = m_image.symbol_count();
|
||||
}
|
||||
|
||||
Loader::~Loader()
|
||||
|
@ -57,8 +59,6 @@ bool Loader::load()
|
|||
if (!m_image.is_valid())
|
||||
return false;
|
||||
|
||||
m_symbol_count = m_image.symbol_count();
|
||||
|
||||
if (!layout())
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue