mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 14:55:08 +00:00
LibELF: Remove DynamicSection from ELFImage
Since ELFDynamicObject needs the actual virtual address of the .dynamic section in the loaded image, and not the file offset like we assumed before, due to MAP_PRIVATE secretly giving us a MAP_SHARED, we can remove all of the Dynamic* code from ELFImage. ELFDynamicLoader only needs ELFImage to get the Program headers at this point. More consolidation opportunities seem likely in the future.
This commit is contained in:
parent
2e349337d3
commit
c21f384d17
2 changed files with 0 additions and 25 deletions
|
@ -117,10 +117,6 @@ bool ELFImage::parse()
|
|||
if (StringView(".strtab") == section_header_table_string(sh.sh_name))
|
||||
m_string_table_section_index = i;
|
||||
}
|
||||
if (sh.sh_type == SHT_DYNAMIC) {
|
||||
ASSERT(!m_dynamic_section_index || m_dynamic_section_index == i);
|
||||
m_dynamic_section_index = i;
|
||||
}
|
||||
}
|
||||
|
||||
// Then create a name-to-index map.
|
||||
|
@ -218,9 +214,3 @@ const ELFImage::Section ELFImage::lookup_section(const String& name) const
|
|||
return section((*it).value);
|
||||
return section(0);
|
||||
}
|
||||
|
||||
const ELFImage::DynamicSection ELFImage::dynamic_section() const
|
||||
{
|
||||
ASSERT(is_dynamic());
|
||||
return section(m_dynamic_section_index);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue