[PATCH 31/78] ARM: aarch64: fix pbl linker script for aarch64

Sascha Hauer s.hauer at pengutronix.de
Fri Mar 16 05:53:07 PDT 2018


Fix output format for aarch64. Also, relocation fixup symbols are in
rela section rather than rel section.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/lib/pbl.lds.S | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/lib/pbl.lds.S b/arch/arm/lib/pbl.lds.S
index be0a4a3b1a..9df1800543 100644
--- a/arch/arm/lib/pbl.lds.S
+++ b/arch/arm/lib/pbl.lds.S
@@ -25,8 +25,13 @@
 #define BASE	(TEXT_BASE - SZ_2M)
 #endif
 
+#ifdef CONFIG_CPU_32
 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
 OUTPUT_ARCH(arm)
+#else
+OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
+OUTPUT_ARCH(aarch64)
+#endif
 SECTIONS
 {
 	. = BASE;
@@ -62,7 +67,11 @@ SECTIONS
 	.data : { *(.data*) }
 
 	.rel_dyn_start : { *(.__rel_dyn_start) }
+#ifdef CONFIG_CPU_32
 	.rel.dyn : { *(.rel*) }
+#else
+	.rela.dyn : { *(.rela*) }
+#endif
 	.rel_dyn_end : { *(.__rel_dyn_end) }
 
 	.__dynsym_start :  { *(.__dynsym_start) }
-- 
2.16.1




More information about the barebox mailing list