aboutsummaryrefslogtreecommitdiff
path: root/arch/xtensa
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2024-06-18 14:56:02 +0100
committerTom Rini <trini@konsulko.com>2024-07-04 16:08:37 -0600
commite8461f4a41831ff3ec28014b85c552632bda0032 (patch)
tree343d9ba982c965d468cf3d6748cf9bb17b6e5182 /arch/xtensa
parent20fa79cfc42ae4389108cac7259ad0fe3f320e9f (diff)
downloadu-boot-e8461f4a41831ff3ec28014b85c552632bda0032.zip
u-boot-e8461f4a41831ff3ec28014b85c552632bda0032.tar.gz
u-boot-e8461f4a41831ff3ec28014b85c552632bda0032.tar.bz2
xtensa: Correct define of _end symbol
So U-Boot is using _end symbol to detect location of devicetree appended at the end of the ROM. It needs to be calculated based on end of .data load address, as in our lds .current address is address in RAM. Tested-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/cpu/u-boot.lds2
-rw-r--r--arch/xtensa/include/asm/ldscript.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/xtensa/cpu/u-boot.lds b/arch/xtensa/cpu/u-boot.lds
index 84ba32c..72e4b9a 100644
--- a/arch/xtensa/cpu/u-boot.lds
+++ b/arch/xtensa/cpu/u-boot.lds
@@ -82,6 +82,8 @@ SECTIONS
__reloc_end = .;
__init_end = .;
+ /* Calculation to get end address in ROM */
+ _end = LOADADDR(.data) + (_data_end - _data_start);
SECTION_bss(__init_end (OVERLAY),)
diff --git a/arch/xtensa/include/asm/ldscript.h b/arch/xtensa/include/asm/ldscript.h
index 78a0b23..bcf0fd5 100644
--- a/arch/xtensa/include/asm/ldscript.h
+++ b/arch/xtensa/include/asm/ldscript.h
@@ -165,7 +165,6 @@
. = ALIGN(8); \
_bss_end = ABSOLUTE(.); \
__bss_end = ABSOLUTE(.); \
- _end = ALIGN(0x8); \
PROVIDE(end = ALIGN(0x8)); \
_stack_sentry = ALIGN(0x8); \
}