From c221558a4c688a9d016f8afcbe1fa71c1856d457 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Thu, 12 Jul 2007 13:03:53 +0000 Subject: [PATCH] Ensure correct linking independent from compiler settings Signed-off-by: Juergen Beisert Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@450 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- arch/x86/stage1.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/stage1.c b/arch/x86/stage1.c index 7aa92bdf3d..542dbd11ee 100644 --- a/arch/x86/stage1.c +++ b/arch/x86/stage1.c @@ -52,7 +52,11 @@ static void enable_rom(void) post_code(0xf2); } -void stage1_main(u32 bist) +/* + * This function is called from assembler code whith its argument on the + * stack. Force the compiler to generate always correct code for this case. + */ +void __attribute__((stdcall)) stage1_main(u32 bist) { int ret; struct mem_file archive, result;