diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-11-27 17:51:22 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-11-29 20:59:56 +0100 |
commit | 351058fa51dbc010c37906b46ecf67a41dbbad8d (patch) | |
tree | d7618117468f050f94ce05cbf0079826b0cb6eac /arch/nios2 | |
parent | ec4ee82ca96a6a4867cd3f2e58fed4afd816d14a (diff) | |
download | barebox-351058fa51dbc010c37906b46ecf67a41dbbad8d.tar.gz barebox-351058fa51dbc010c37906b46ecf67a41dbbad8d.tar.xz |
bootm: push relocate_image up to the generic command
All handlers used to just relocate the image without any checks, so
we are doomed if we write outside of SDRAM or will overwrite ourselves.
Move the relocation up to the generic part where we have a chance
of catching these issues.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/nios2')
-rw-r--r-- | arch/nios2/lib/bootm.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c index c38243f9a3..b5b344f499 100644 --- a/arch/nios2/lib/bootm.c +++ b/arch/nios2/lib/bootm.c @@ -43,9 +43,6 @@ static int do_bootm_linux(struct image_data *idata) kernel = (void (*)(int, int, int, const char *))ntohl(os_header->ih_ep); - if (relocate_image(idata->os, (void *)ntohl(os_header->ih_load))) - return -1; - /* kernel parameters passing * r4 : NIOS magic * r5 : initrd start |