From: Emmanuel Blot Date: Mon, 19 Jan 2015 13:39:44 +0000 (+0100) Subject: arm: Make sure __k_unpaged_MINIX is first X-Git-Url: http://zhaoyanbai.com/repos/dig.html?a=commitdiff_plain;h=refs%2Fchanges%2F58%2F2958%2F1;p=minix.git arm: Make sure __k_unpaged_MINIX is first Do not rely on build order to set startup symbol (`__k_unpaged_MINIX`) at kernel binary start Change-Id: I1ed3f9309fe66ff97e24915938c114d5a159deaf --- diff --git a/minix/kernel/arch/earm/head.S b/minix/kernel/arch/earm/head.S index 03f9f97e0..b384283e1 100644 --- a/minix/kernel/arch/earm/head.S +++ b/minix/kernel/arch/earm/head.S @@ -18,7 +18,7 @@ #include "arch_proto.h" /* K_STACK_SIZE */ -.text +.section .startup /*===========================================================================*/ /* MINIX */ /*===========================================================================*/ @@ -27,6 +27,7 @@ MINIX: /* this is the entry point for the MINIX kernel */ b multiboot_init +.text multiboot_init: ldr sp, =load_stack_start /* make usable stack */ mov fp, #0 diff --git a/minix/kernel/arch/earm/kernel.lds b/minix/kernel/arch/earm/kernel.lds index b41fcad29..860e40167 100644 --- a/minix/kernel/arch/earm/kernel.lds +++ b/minix/kernel/arch/earm/kernel.lds @@ -14,7 +14,7 @@ SECTIONS . = _kern_phys_base; __k_unpaged__kern_unpaged_start = .; - .unpaged_text ALIGN(4096) : { unpaged_*.o(.text) } + .unpaged_text ALIGN(4096) : { unpaged_*.o(.startup); unpaged_*.o(.text) } .unpaged_data ALIGN(4096) : { unpaged_*.o(.data .rodata*) } __k_unpaged__kern_unpaged_edata = .;