SPURS: Implement some portions of taskset policy manager

This commit is contained in:
S Gopal Rajagopal 2015-02-02 01:32:40 +05:30
parent 61342946a4
commit ba6ac5019e
7 changed files with 345 additions and 108 deletions

View file

@ -247,7 +247,7 @@ namespace loader
return ok;
}
handler::error_code elf32::load_data(u32 offset)
handler::error_code elf32::load_data(u32 offset, bool skip_writeable)
{
Elf_Machine machine = (Elf_Machine)(u16)(m_ehdr.is_le() ? m_ehdr.data_le.e_machine : m_ehdr.data_be.e_machine);
@ -270,6 +270,11 @@ namespace loader
return loading_error;
}
if (skip_writeable == true && (phdr.data_be.p_flags & 2/*PF_W*/) != 0)
{
continue;
}
if (filesz)
{
m_stream->Seek(handler::get_stream_offset() + offset);