summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-07-30 15:45:41 -0600
committerCommit Bot <commit-bot@chromium.org>2019-07-31 18:55:48 +0000
commit3e1c72ea23fe3c37f5a4e4e8bceea38c0322ba31 (patch)
tree3dfe5a8708d231c7b260ec2659d63d0faf2fdc01 /core
parentb224441aaaa5dd08274811d65bb795b4abc231d8 (diff)
downloadchrome-ec-3e1c72ea23fe3c37f5a4e4e8bceea38c0322ba31.tar.gz
common/system: refactor some confusing ifdefs
I had a hard time reading this section, so figured I may as well rewrite it to use IS_ENABLED while I was here. Gave CONFIG_{RO,RW}_HEAD_ROOM a default value of zero here, which makes the math work out for boards without it anyway. BUG=none BRANCH=none TEST=buildall Change-Id: I87dc2d73838c350088916b57aa51d5f368c5592f Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1727570 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/ec.lds.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 93eb70550b..90ba292c5b 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -80,10 +80,10 @@ SECTIONS
} > SHARED_LIB
#endif
.text : {
-#if defined(SECTION_IS_RO) && defined(CONFIG_RO_HEAD_ROOM)
+#ifdef SECTION_IS_RO
. = . + CONFIG_RO_HEAD_ROOM;
#endif
-#if defined(SECTION_IS_RW) && defined(CONFIG_RW_HEAD_ROOM)
+#ifdef SECTION_IS_RW
. = . + CONFIG_RW_HEAD_ROOM;
#endif
*(.text.vecttable)