]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Blackfin arch: make sure the BSS and kernel load address are 4 byte aligned
authorMike Frysinger <vapier.adi@gmail.com>
Wed, 6 Aug 2008 09:10:57 +0000 (17:10 +0800)
committerBryan Wu <cooloney@kernel.org>
Wed, 6 Aug 2008 09:10:57 +0000 (17:10 +0800)
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/kernel/vmlinux.lds.S
arch/blackfin/mach-common/arch_checks.c

index 0896e38d61087f1398a096cb6790d96afc4febc6..d062597e6217faf7dff3b7e42e542bbd3929a299 100644 (file)
@@ -83,6 +83,7 @@ SECTIONS
 #if !L1_DATA_B_LENGTH
                *(.l1.bss.B)
 #endif
+               . = ALIGN(4);
                ___bss_stop = .;
        }
 
index f9160d83b91f5ecd632d011f71c6f29e9f7746f3..5986758b2752b75737141ebb5cec6d76c423c38d 100644 (file)
@@ -27,6 +27,7 @@
  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <asm/fixed_code.h>
 #include <asm/mach/anomaly.h>
 #include <asm/mach-common/clocks.h>
 
 # endif
 
 #endif /* CONFIG_BFIN_KERNEL_CLOCK */
+
+#if CONFIG_BOOT_LOAD < FIXED_CODE_END
+# error "The kernel load address must be after the fixed code section"
+#endif
+
+#if (CONFIG_BOOT_LOAD & 0x3)
+# error "The kernel load address must be 4 byte aligned"
+#endif