diff options
author | Patrick Georgi <pgeorgi@google.com> | 2018-06-29 16:52:28 +0200 |
---|---|---|
committer | Daisuke Nojiri <dnojiri@chromium.org> | 2018-07-16 08:46:35 -0700 |
commit | 7627906601207f2dd1cd7c6d3ec5fc6663441ec5 (patch) | |
tree | 57602e5d439ef6850fbdbfff894036fd5ccbd26d /chip | |
parent | 857b6fd3514fe02663ac2eebb288e7df9c4286dc (diff) | |
download | chrome-ec-7627906601207f2dd1cd7c6d3ec5fc6663441ec5.tar.gz |
cortex-m: Generate vector table in C
Different versions of the linker behave differently when mixing object
built with lto enabled (desirable for code size reduction) and disabled
(assembler code), especially when they refer to each other symbols:
The file evaluation order of the linker becomes important as it
eliminates dead code at various points in time, and LTO code referring
to non-LTO code or vice versa, is not visible at early runs.
Sadly, just changing the order on the command line isn't sufficient:
What works for gcc8 breaks gcc6 (and may behave different in even more
ways on gcc4 or other versions).
Therefore, implement the vector table in C, so it's compiled in LTO
mode, just like the code it refers to.
BUG=b:65441143
BRANCH=none
TEST=with this change coral EC is functional when built with the gcc 8.1
based coreboot toolchain.
Change-Id: I9b75f6558f0357e18000ff1161096c8f9c94a8ac
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1120333
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/g/build.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/chip/g/build.mk b/chip/g/build.mk index 7b55bc1a97..8c8a27d822 100644 --- a/chip/g/build.mk +++ b/chip/g/build.mk @@ -108,6 +108,7 @@ custom-ro_objs-y += chip/g/uartn.o custom-ro_objs-y += common/printf.o custom-ro_objs-y += common/util.o custom-ro_objs-y += core/cortex-m/init.o +custom-ro_objs-y += core/cortex-m/vecttable.o custom-ro_objs-y += core/cortex-m/panic.o dirs-y += chip/g/dcrypto dirs-y += chip/g/loader |