check entry_address after evaluating options
authorlothar <lothar>
Tue, 15 Sep 2009 13:34:10 +0000 (13:34 +0000)
committerlothar <lothar>
Tue, 15 Sep 2009 13:34:10 +0000 (13:34 +0000)
packages/hal/arm/arch/v2_0/src/redboot_linux_exec.c

index 2e7bd82..ac7c7f1 100644 (file)
@@ -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