mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:07:35 +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
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)
|
Loader::Loader(const u8* buffer, size_t size, bool verbose_logging)
|
||||||
: m_image(buffer, size, verbose_logging)
|
: m_image(buffer, size, verbose_logging)
|
||||||
{
|
{
|
||||||
|
if (m_image.is_valid())
|
||||||
|
m_symbol_count = m_image.symbol_count();
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader::~Loader()
|
Loader::~Loader()
|
||||||
|
@ -57,8 +59,6 @@ bool Loader::load()
|
||||||
if (!m_image.is_valid())
|
if (!m_image.is_valid())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_symbol_count = m_image.symbol_count();
|
|
||||||
|
|
||||||
if (!layout())
|
if (!layout())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue