diff options
author | Tom Hughes <tomhughes@chromium.org> | 2021-10-14 22:19:09 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-15 03:06:54 +0000 |
commit | d3225e63daf32f02e46ad6c5ea865c6b870b1232 (patch) | |
tree | f7ae68022bffffaee4afe5c038b17d34948a26c2 /core/cortex-m | |
parent | ed2ee23deb0f643e3f0b713df2707ca6aed8deef (diff) | |
download | chrome-ec-d3225e63daf32f02e46ad6c5ea865c6b870b1232.tar.gz |
core/cortex-m: Use original __data_lma_start when compiling with gccstabilize-14285.B-main
https://crrev.com/c/3169964 changed __data_lma_start from "." to
LOADADDR(.data) to fix dartmonkey when compiling with clang. This
changed the LMA address on some boards, such as voxel. Even though the
new address looks correct (matches start of .data section), we are
seeing an exception on voxel during startup. For now, keep clang and gcc
separate until we can diagnose the issue.
BRANCH=none
BUG=b:172020503, b:202863352
TEST=make buildall -j
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I8313210c89559a6159f311821a18e7b310a3ada6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3224378
Reviewed-by: caveh jalali <caveh@chromium.org>
Commit-Queue: caveh jalali <caveh@chromium.org>
Tested-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'core/cortex-m')
-rw-r--r-- | core/cortex-m/ec.lds.S | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index b099691630..1c9402ebde 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -351,7 +351,14 @@ SECTIONS __data_lma_start = ORIGIN(ROM_RESIDENT_VMA); #define INIT_ROM_LMA (ORIGIN(ROM_RESIDENT_VMA) + SIZEOF(.data)) #else +/* + * TODO(b/202863352): Unify clang and gcc behavior. + */ +#ifdef __clang__ __data_lma_start = LOADADDR(.data); +#else + __data_lma_start = .; +#endif #define INIT_ROM_LMA ORIGIN(ROM_RESIDENT_VMA) #endif |