[PATCH 4/7] binman_sym: update symbol alignment to 8 bytes

Peng Fan (OSS) peng.fan at oss.nxp.com
Sat May 7 11:21:39 CEST 2022


From: Peng Fan <peng.fan at nxp.com>

To ARM64 SPL which normally not enable MMU and Dcache, there will be
data abort if the symbol is not 8 bytes aligned, because symbol type is
ulong which is 8 bytes. So update to 8 bytes aligned.

Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
 include/binman_sym.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/binman_sym.h b/include/binman_sym.h
index 72e6765fe52..aac2dad0ec5 100644
--- a/include/binman_sym.h
+++ b/include/binman_sym.h
@@ -34,7 +34,7 @@
  */
 #define binman_sym_declare(_type, _entry_name, _prop_name) \
 	_type binman_symname(_entry_name, _prop_name) \
-		__attribute__((aligned(4), unused, section(".binman_sym")))
+		__attribute__((aligned(8), unused, section(".binman_sym")))
 
 /**
  * binman_sym_extern() - Declare a extern symbol that will be used at run-time
@@ -45,7 +45,7 @@
  */
 #define binman_sym_extern(_type, _entry_name, _prop_name) \
 	extern _type binman_symname(_entry_name, _prop_name) \
-		__attribute__((aligned(4), unused, section(".binman_sym")))
+		__attribute__((aligned(8), unused, section(".binman_sym")))
 
 /**
  * binman_sym_declare_optional() - Declare an optional symbol
@@ -59,7 +59,7 @@
  */
 #define binman_sym_declare_optional(_type, _entry_name, _prop_name) \
 	_type binman_symname(_entry_name, _prop_name) \
-		__attribute__((aligned(4), weak, unused, \
+		__attribute__((aligned(8), weak, unused, \
 		section(".binman_sym")))
 
 /**
-- 
2.36.0



More information about the U-Boot mailing list