From ffd923d280a7f1e61bf86c6162e0b83acec83415 Mon Sep 17 00:00:00 2001 From: lothar Date: Tue, 15 Sep 2009 13:34:10 +0000 Subject: [PATCH] check entry_address after evaluating options --- packages/hal/arm/arch/v2_0/src/redboot_linux_exec.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/hal/arm/arch/v2_0/src/redboot_linux_exec.c b/packages/hal/arm/arch/v2_0/src/redboot_linux_exec.c index 2e7bd82e..ac7c7f16 100644 --- a/packages/hal/arm/arch/v2_0/src/redboot_linux_exec.c +++ b/packages/hal/arm/arch/v2_0/src/redboot_linux_exec.c @@ -328,11 +328,6 @@ do_exec(int argc, char *argv[]) #endif extern char __tramp_start__[], __tramp_end__[]; - // Check to see if a valid image has been loaded - if (entry_address == (unsigned long)NO_MEMORY) { - diag_printf("Can't execute Linux - invalid entry address\n"); - return; - } #if 1 target = load_address; entry = entry_address; @@ -372,6 +367,12 @@ do_exec(int argc, char *argv[]) return; } + // Check to see if a valid image has been loaded + if (entry == (unsigned long)NO_MEMORY) { + diag_printf("Can't execute Linux - invalid entry address\n"); + return; + } + // Set up parameters to pass to kernel // CORE tag must be present & first -- 2.39.5