[PATCH 17/19] arm: Provide an rcode section in ARMv8 link script

Simon Glass
2024-09-25T13:02:05Z

Collect the relocation code in one place so that it can be used by the
SPL relocating-loader.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

arch/arm/cpu/armv8/u-boot-spl.lds | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds
index fed69644b55..a296af39320 100644
--- a/arch/arm/cpu/armv8/u-boot-spl.lds
+++ b/arch/arm/cpu/armv8/u-boot-spl.lds
@@ -27,8 +27,16 @@ SECTIONS
.text : {
. = ALIGN(8);
CPUDIR/start.o (.text*)
+
+ /* put relocation code all together */
+ _rcode_start = .;
+ *(.text.rcode)
+ *(.text.rdata)
+ _rcode_end = .;
+
*(.text*)
} >.sram
+ _rcode_size = _rcode_end - _rcode_start;

.rodata : {
. = ALIGN(8);
--
2.43.0