]> rtime.felk.cvut.cz Git - sysless.git/commitdiff
h8300: bloader: Fix relocation condition
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 16 Mar 2011 06:32:15 +0000 (07:32 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 16 Mar 2011 06:32:15 +0000 (07:32 +0100)
Previously used __boot_fn_start is always in RAM. We must use etext to
find out where the code is stored.

arch/h8300/generic/bloader/bloader.c

index 60dbeb07816b2c124058abd143af36aa992242f5..f0144adec77a6b841f4ef8a3f906ee94baa6ff1f 100644 (file)
@@ -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);