[quote user="Ron"]
Basically I would be copying words from SPI flash to RAM
[/quote]
Correct.
[quote user="Ron"]
how do I give control to the new loaded program then ?
[/quote]
Usually this is done by the use of a function pointer in C. You would assign the address of the entry point in your application image to the function pointer and then your secondary bootloader would then call that function pointer. Something like the following.
static void (*appEntry)();
unsigned int entryPoint = 0;
<somewhere within your bootloader after copying the image to RAM and assigning the address to the variable entryPoint, you then:
/* Giving control to the application */
appEntry = (void (*)(void)) entryPoint;
(*appEntry)( );