diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2012-05-15 09:40:14 -0700 |
---|---|---|
committer | Vincent Palatin <vpalatin@chromium.org> | 2012-05-15 09:46:06 -0700 |
commit | c14f5ff82cf4f9d347858b2e86aaf14f046dfe15 (patch) | |
tree | d611c1968e38c3ae1b7d21b8299e91a06f426554 /core | |
parent | 512ff9b95e670babb4ef428bfb474e6330b99edc (diff) | |
download | chrome-ec-c14f5ff82cf4f9d347858b2e86aaf14f046dfe15.tar.gz |
fix FMAP linker section offset
When the flash memory base address is not 0 (e.g. stm32), the .google
section for FMAP was badly positioned inside the EC binary.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8865
TEST=make BOARD=daisy && make BOARD=link
manually verify the .map file for Daisy and boot patched Daisy EC with CONFIG_VBOOT
activated.
Change-Id: Ibc994d4d52e49dc7bc642a1a138ac533ededbcd3
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/ec.lds.S | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 75d056b1fd..2a323785ed 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -6,6 +6,7 @@ #define CONFIG_FW_SECT_OFF(section) CONFIG_FW_##section##_OFF #define CONFIG_FW_BASE(section) (CONFIG_FLASH_BASE + CONFIG_FW_SECT_OFF(section)) +#define CONFIG_FMAP_BASE(section) CONFIG_FW_BASE(section) + CONFIG_FMAP_OFF OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) @@ -97,7 +98,7 @@ SECTIONS __data_end = .; } > IRAM #if defined(SECTION_IS_RO) && defined(CONFIG_VBOOT) - .google CONFIG_FMAP_OFF : AT(CONFIG_FMAP_OFF) { + .google CONFIG_FMAP_BASE(SECTION) : AT(CONFIG_FMAP_BASE(SECTION)) { *(.google) } > FLASH #else |