From 41b870c89094742fac0d9000e2abce50c1723418 Mon Sep 17 00:00:00 2001 From: Emmanuel Blot Date: Mon, 19 Jan 2015 14:39:44 +0100 Subject: [PATCH] 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 --- minix/kernel/arch/earm/head.S | 3 ++- minix/kernel/arch/earm/kernel.lds | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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 = .; -- 2.44.0