From: Michal Sojka Date: Wed, 16 Mar 2011 06:32:15 +0000 (+0100) Subject: h8300: bloader: Fix relocation condition X-Git-Url: http://rtime.felk.cvut.cz/gitweb/sysless.git/commitdiff_plain/d68f911e429fbf3d1ba8c915722247a6549ff247 h8300: bloader: Fix relocation condition Previously used __boot_fn_start is always in RAM. We must use etext to find out where the code is stored. --- diff --git a/arch/h8300/generic/bloader/bloader.c b/arch/h8300/generic/bloader/bloader.c index 60dbeb0..f0144ad 100644 --- a/arch/h8300/generic/bloader/bloader.c +++ b/arch/h8300/generic/bloader/bloader.c @@ -121,7 +121,7 @@ void boot_test() } - if((__u8*)&__boot_fn_start<(__u8*)0xffb000) { + if((__u8*)&etext<(__u8*)0xffb000) { /* If we are not in the internal RAM, copy and run us from * there */ RelocatedProgMode(HIT_LOAD_BAUD);