summaryrefslogtreecommitdiff
path: root/common/fmap.c
diff options
context:
space:
mode:
authorShamile Khan <shamile.khan@intel.com>2015-11-05 14:25:28 -0800
committerchrome-bot <chrome-bot@chromium.org>2015-11-09 12:49:37 -0800
commit8608ea0a6c28918f60e8fada178e6d8b9aaa1c62 (patch)
tree8ac137e6f669d404c4f43a0f29b684f2497d58d7 /common/fmap.c
parentdd5b2e6eb7e214eabc7c8a90581841b4f3eaf2c0 (diff)
downloadchrome-ec-8608ea0a6c28918f60e8fada178e6d8b9aaa1c62.tar.gz
pd: Add protection to FMAP data so it is not removed by linker
Most of the pd ECs have CONFIG_LTO enabled which turns on GCC Link-Time Optimizations. Unless protected, this removes the FMAP data from the generated EC images. BUG=chrome-os-partner:46442 TEST=Manually tested pd programming on Kunimitsu. flashrom -p ec:dev=1 -w ec.bin is successful BRANCH=none Change-Id: I3badd1b245ab7490d75331be8074a0557f7b4d4b Signed-off-by: Shamile Khan <shamile.khan@intel.com> Reviewed-on: https://chromium-review.googlesource.com/310879 Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'common/fmap.c')
-rw-r--r--common/fmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/fmap.c b/common/fmap.c
index 35111c6d1d..2402484b52 100644
--- a/common/fmap.c
+++ b/common/fmap.c
@@ -66,7 +66,7 @@ struct fmap_area_header {
const struct _ec_fmap {
struct fmap_header header;
struct fmap_area_header area[NUM_EC_FMAP_AREAS];
-} ec_fmap __attribute__((section(".google"))) = {
+} ec_fmap __keep __attribute__((section(".google"))) = {
/* Header */
{
.fmap_signature = {'_', '_', 'F', 'M', 'A', 'P', '_', '_'},