Skip to contentSkip to conversation

mpc83xx: Define _end symbol

PATCH New Mario Six 1 participant 2 messages Jan 28, 2019 – Mar 29, 2019 PowerPC

lore
Share & tools
lore

Mario Six

author
#0 lore raw

PATCH 1/1 mpc83xx: Define _end symbol

To support OF_EMBED, the MPC83xx architecture has to define the "_end" symbol to correctly access the appended DT.

Fortunately, MPC8xx already defines the symbol, and the linker script is quite similar to that of MPC83xx, so copy this approach for MPC83xx.

---
 arch/powerpc/cpu/mpc83xx/u-boot.lds | 6 ++++++
 1 file changed, 6 insertions(+)
arch/powerpc/cpu/mpc83xx/u-boot.lds +6 -0
index 37a13fd8c2a..d10f528da4c 100644
@@ -52,6 +52,12 @@ SECTIONS
   __ex_table : { *(__ex_table) }
   __stop___ex_table = .;
 
+  /*
+   * _end - This is end of u-boot.bin image.
+   * dtb will be appended here to make u-boot-dtb.bin
+   */
+  _end = .;
+
   . = ALIGN(4096);
   __init_begin = .;
   .text.init : { *(.text.init) }
Signature · 1 line
2.20.1
author
#1 lore raw

PATCH 1/1 mpc83xx: Define _end symbol

Quoted 32 lines · Mario Six

To support OF_EMBED, the MPC83xx architecture has to define the "_end" symbol to correctly access the appended DT.

Fortunately, MPC8xx already defines the symbol, and the linker script is quite similar to that of MPC83xx, so copy this approach for MPC83xx.

---
 arch/powerpc/cpu/mpc83xx/u-boot.lds | 6 ++++++
 1 file changed, 6 insertions(+)
arch/powerpc/cpu/mpc83xx/u-boot.lds +6 -1
index 37a13fd8c2a..d10f528da4c 100644
@@ -52,6 +52,12 @@ SECTIONS
   __ex_table : { *(__ex_table) }
   __stop___ex_table = .;
 
+  /*
+   * _end - This is end of u-boot.bin image.
+   * dtb will be appended here to make u-boot-dtb.bin
+   */
+  _end = .;
+
   . = ALIGN(4096);
   __init_begin = .;
   .text.init : { *(.text.init) }
--

2.20.1

Quoted 2 lines

_______________________________________________

Applied to u-boot-mpc83xx/next.