2008-10-20 04:12:44 +00:00
|
|
|
#include "ElfFile.h"
|
|
|
|
|
2012-10-16 02:17:38 +00:00
|
|
|
CElfFile::CElfFile(Framework::CStream& stream)
|
|
|
|
: CElfFileContainer(stream)
|
|
|
|
, CELF(GetFileContent())
|
2008-10-20 04:12:44 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
CElfFile::~CElfFile()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CElfFileContainer::CElfFileContainer(Framework::CStream& input)
|
|
|
|
{
|
2012-10-16 02:17:38 +00:00
|
|
|
uint32 size = static_cast<uint32>(input.GetLength());
|
|
|
|
m_content = new uint8[size];
|
|
|
|
input.Read(m_content, size);
|
2008-10-20 04:12:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CElfFileContainer::~CElfFileContainer()
|
|
|
|
{
|
2012-10-16 02:17:38 +00:00
|
|
|
delete [] m_content;
|
2008-10-20 04:12:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uint8* CElfFileContainer::GetFileContent() const
|
|
|
|
{
|
2012-10-16 02:17:38 +00:00
|
|
|
return m_content;
|
2008-10-20 04:12:44 +00:00
|
|
|
}
|