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:
Sean Cross 2020-03-10 14:40:21 +08:00
parent 36dbc97a61
commit edf723e107

View file

@ -75,6 +75,8 @@ impl XousArgument for XousKernel {
fn finalize(&mut self, offset: usize) -> usize {
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()
}