diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-07-15 15:18:08 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-18 20:30:40 +0000 |
commit | 41bf79a1ae9a4c107fbf364aa1ab0f833e4b94b9 (patch) | |
tree | 08d300f133eb7ff3f550444e8155da581762e53f | |
parent | ab4c9142a68bd64754a7239d74efc00207fee87e (diff) | |
download | chrome-ec-41bf79a1ae9a4c107fbf364aa1ab0f833e4b94b9.tar.gz |
core: Add "end" to linker scripts
_sbrk in newlib (embedded C standard library implementation) expects the
"end" symbol to point to the start of free memory.
BRANCH=none
BUG=b:234181908
TEST=./util/compare_build.sh -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I9f206e2ed5f050d92b579e0b65b05be40f929093
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3766504
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
-rw-r--r-- | core/cortex-m/ec.lds.S | 6 | ||||
-rw-r--r-- | core/cortex-m0/ec.lds.S | 6 | ||||
-rw-r--r-- | core/minute-ia/ec.lds.S | 6 | ||||
-rw-r--r-- | core/nds32/ec.lds.S | 6 | ||||
-rw-r--r-- | core/riscv-rv32i/ec.lds.S | 6 |
5 files changed, 30 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 896e49097b..ac3442cafe 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -461,6 +461,12 @@ SECTIONS __data_end = .; /* + * _sbrk in newlib expects "end" symbol to point to start of + * free memory. + */ + end = .; + + /* * Shared memory buffer must be at the end of preallocated * RAM, so it can expand to use all the remaining RAM. */ diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S index 3321dd1b08..80c30b8d38 100644 --- a/core/cortex-m0/ec.lds.S +++ b/core/cortex-m0/ec.lds.S @@ -295,6 +295,12 @@ SECTIONS __data_end = .; /* + * _sbrk in newlib expects "end" symbol to point to start of + * free memory. + */ + end = .; + + /* * Shared memory buffer must be at the end of preallocated * RAM, so it can expand to use all the remaining RAM. */ diff --git a/core/minute-ia/ec.lds.S b/core/minute-ia/ec.lds.S index 60239d3680..253badd9b5 100644 --- a/core/minute-ia/ec.lds.S +++ b/core/minute-ia/ec.lds.S @@ -220,6 +220,12 @@ SECTIONS __bss_end = .; __bss_size_words = ABSOLUTE((__bss_end - __bss_start) / 4); + /* + * _sbrk in newlib expects "end" symbol to point to start of + * free memory. + */ + end = .; + /* * Shared memory buffer must be at the end of * preallocated RAM, so it can expand to use all the diff --git a/core/nds32/ec.lds.S b/core/nds32/ec.lds.S index 084c6f6b64..87e87709de 100644 --- a/core/nds32/ec.lds.S +++ b/core/nds32/ec.lds.S @@ -267,6 +267,12 @@ SECTIONS __bss_end = .; /* + * _sbrk in newlib expects "end" symbol to point to start of + * free memory. + */ + end = .; + + /* * Shared memory buffer must be at the end of preallocated RAM, * so it can expand to use all the remaining RAM. */ diff --git a/core/riscv-rv32i/ec.lds.S b/core/riscv-rv32i/ec.lds.S index 24b2fb68ef..c42ec29df8 100644 --- a/core/riscv-rv32i/ec.lds.S +++ b/core/riscv-rv32i/ec.lds.S @@ -338,6 +338,12 @@ SECTIONS __bss_end = .; /* + * _sbrk in newlib expects "end" symbol to point to start of + * free memory. + */ + end = .; + + /* * Shared memory buffer must be at the end of preallocated RAM, * so it can expand to use all the remaining RAM. */ |