|
|
@ -389,8 +389,12 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
if (bss_size) {
|
|
|
|
if (bss_size) {
|
|
|
|
auto block_guard = detail::ScopeExit([&] {
|
|
|
|
auto block_guard = detail::ScopeExit([&] {
|
|
|
|
page_table.UnmapCodeMemory(addr + nro_size, bss_addr, bss_size);
|
|
|
|
page_table.UnmapCodeMemory(
|
|
|
|
page_table.UnmapCodeMemory(addr, nro_addr, nro_size);
|
|
|
|
addr + nro_size, bss_addr, bss_size,
|
|
|
|
|
|
|
|
Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange);
|
|
|
|
|
|
|
|
page_table.UnmapCodeMemory(
|
|
|
|
|
|
|
|
addr, nro_addr, nro_size,
|
|
|
|
|
|
|
|
Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const ResultCode result{
|
|
|
|
const ResultCode result{
|
|
|
@ -570,17 +574,21 @@ public:
|
|
|
|
auto& page_table{system.CurrentProcess()->PageTable()};
|
|
|
|
auto& page_table{system.CurrentProcess()->PageTable()};
|
|
|
|
|
|
|
|
|
|
|
|
if (info.bss_size != 0) {
|
|
|
|
if (info.bss_size != 0) {
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size +
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(
|
|
|
|
info.ro_size + info.data_size,
|
|
|
|
info.nro_address + info.text_size + info.ro_size + info.data_size, info.bss_address,
|
|
|
|
info.bss_address, info.bss_size));
|
|
|
|
info.bss_size, Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size + info.ro_size,
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(
|
|
|
|
info.src_addr + info.text_size + info.ro_size,
|
|
|
|
info.nro_address + info.text_size + info.ro_size,
|
|
|
|
info.data_size));
|
|
|
|
info.src_addr + info.text_size + info.ro_size, info.data_size,
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size,
|
|
|
|
Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange));
|
|
|
|
info.src_addr + info.text_size, info.ro_size));
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address, info.src_addr, info.text_size));
|
|
|
|
info.nro_address + info.text_size, info.src_addr + info.text_size, info.ro_size,
|
|
|
|
|
|
|
|
Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange));
|
|
|
|
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(
|
|
|
|
|
|
|
|
info.nro_address, info.src_addr, info.text_size,
|
|
|
|
|
|
|
|
Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange));
|
|
|
|
return ResultSuccess;
|
|
|
|
return ResultSuccess;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|