From: Mike Frysinger Date: Wed, 6 Aug 2008 09:10:57 +0000 (+0800) Subject: Blackfin arch: make sure the BSS and kernel load address are 4 byte aligned X-Git-Tag: v2.6.27-rc4~58^2~21 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1375204611f417541e55ee09e248acdbbb94356d;p=linux-2.6 Blackfin arch: make sure the BSS and kernel load address are 4 byte aligned Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S index 0896e38d61..d062597e62 100644 --- a/arch/blackfin/kernel/vmlinux.lds.S +++ b/arch/blackfin/kernel/vmlinux.lds.S @@ -83,6 +83,7 @@ SECTIONS #if !L1_DATA_B_LENGTH *(.l1.bss.B) #endif + . = ALIGN(4); ___bss_stop = .; } diff --git a/arch/blackfin/mach-common/arch_checks.c b/arch/blackfin/mach-common/arch_checks.c index f9160d83b9..5986758b27 100644 --- a/arch/blackfin/mach-common/arch_checks.c +++ b/arch/blackfin/mach-common/arch_checks.c @@ -27,6 +27,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include @@ -53,3 +54,11 @@ # 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