From 7b0f9fa0762209726036810dde4214b54b5bdf46 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Tue, 28 Oct 2014 22:02:14 -0700 Subject: [PATCH] romstage: Pass .car.data section as ignore while adding stage We don't want segment for .car.data section to be considered while elf_to_stage transformation is being done. Thus, use -S option for add-stage. With this change in place, we can get rid of the Forbidden global variable check in x86 Makefile to ensure that no data / bss section is present in romstage. BUG=None BRANCH=None TEST=Compiles for falco and boots to kernel prompt Change-Id: I175a6d3f25febf22ae6e05e5edd9f6de597aece2 Signed-off-by: Furquan Shaikh Reviewed-on: https://chromium-review.googlesource.com/226169 Reviewed-by: Aaron Durbin Reviewed-by: Patrick Georgi Tested-by: Furquan Shaikh Commit-Queue: Furquan Shaikh --- src/arch/x86/Makefile.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index 4436feb53b..c408cd297f 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -59,7 +59,8 @@ endif # CONFIG_HAVE_OPTION_TABLE ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32),y) CBFSTOOL_PRE1_OPTS = -m x86 -o $$(( $(CONFIG_ROM_SIZE) - $(CONFIG_CBFS_SIZE) )) -CBFSTOOL_PRE_OPTS = -b $(shell cat $(objcbfs)/base_xip.txt) +# Make sure that segment for .car.data is ignored while adding romstage. +CBFSTOOL_PRE_OPTS = -b $(shell cat $(objcbfs)/base_xip.txt) -S ".car.data" endif LIBGCC_WRAP_LDFLAGS := --wrap __divdi3 --wrap __udivdi3 --wrap __moddi3 --wrap __umoddi3