From c46a39237a18bdd4de826bce10ae89be718f9289 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Fri, 2 Oct 2015 16:17:41 -0700 Subject: arch/x86: Link walkcbfs.S instead on including it in bootblock.S The code flow doesn't fall through to walkcbfs, as it does in the rest of bootblock.S. Instead, walkcbfs is called (albeit via a jmp). The linker cannot know this when walkcbfs.S is included directly. When we use a CAR bootblock, we lose several hundred bytes because walkcbfs is not garbage-collected, yet it isn't used. This problem is solved by assembling walkcbfs.S separately, and linking it. Change-Id: Ib3a976db09b9ff270b7677cb4f9db80b0b025e22 Signed-off-by: Alexandru Gagniuc Reviewed-on: http://review.coreboot.org/11785 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/arch/x86/walkcbfs.S | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/arch/x86/walkcbfs.S') diff --git a/src/arch/x86/walkcbfs.S b/src/arch/x86/walkcbfs.S index 9c26d3c9a9..ac2d1341eb 100644 --- a/src/arch/x86/walkcbfs.S +++ b/src/arch/x86/walkcbfs.S @@ -18,6 +18,9 @@ #define CBFS_FILE_STRUCTSIZE (CBFS_FILE_OFFSET + 4) +.section .text +.global walkcbfs_asm + /* * input %esi: filename * input %esp: return address (not pointer to return address!) -- cgit v1.2.3