From a6e24f1672c908f3c2f2a2e5050975b3dfef5986 Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Tue, 26 Jun 2012 12:12:11 +0800 Subject: [PATCH] Add an option flag to intentionally shift binary code We need a simple way to build an EC image that is binary-wise much different from the original one, so that we can test EC update as much thoroughly as possible. By padding useless space, we can have an image with exactly same functionality but binary-wise different. BUG=chrome-os-partner:10264 TEST=Build and run without error. Change-Id: I070bec7cec71db1662238ca6af10e864c82ba428 Reviewed-on: https://gerrit.chromium.org/gerrit/26083 Reviewed-by: Yung-Chieh Lo Tested-by: Vic Yang Commit-Ready: Vic Yang --- core/cortex-m/ec.lds.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 9bfd2aeac6..53c5960045 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -26,7 +26,11 @@ SECTIONS . = ALIGN(4); __version_struct_offset = .; *(.rodata.ver) +#ifdef SHIFT_CODE_FOR_TEST + . = ALIGN(256); +#else . = ALIGN(4); +#endif OUTDIR/core/CORE/init.o (.text) *(.text*) #ifdef COMPILE_FOR_RAM