mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
create-image: verify the kernel image address is sane
Rust inconsistently applies linker scripts. Verify the image being added has a script that makes sense. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
36dbc97a61
commit
edf723e107
1 changed files with 2 additions and 0 deletions
|
|
@ -75,6 +75,8 @@ impl XousArgument for XousKernel {
|
||||||
|
|
||||||
fn finalize(&mut self, offset: usize) -> usize {
|
fn finalize(&mut self, offset: usize) -> usize {
|
||||||
self.load_offset = offset as u32;
|
self.load_offset = offset as u32;
|
||||||
|
assert!(self.text_offset > 0xff00_0000,
|
||||||
|
"kernel text section is invalid: 0x{:08x} < 0xff000000 -- was it linked with a linker script?", self.text_offset);
|
||||||
self.program.len()
|
self.program.len()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue