loader: fix kernel text section ownership

The text section of the kernel should be owned by the kernel itself. Due
to a typo, only the last page of the text section was being marked as
owned by the text section.

This marks the remainder of the section as being owned by the kernel.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-01-08 11:00:50 +08:00 committed by bunnie
parent 4ef581a266
commit 47e0b85b1b

View file

@ -468,7 +468,7 @@ impl ProgramDescription {
self.text_offset as usize + offset,
flag_defaults | FLG_X,
);
allocator.change_owner(pid as XousPid, load_offset + offset);
allocator.change_owner(pid as XousPid, load_offset + offset + rounded_data_bss);
}
// Map the process data section into RAM.