[U-Boot] [PATCH 4/4] arm64: Make checkarmreloc accept arm64 relocations

Scott Wood scottwood at freescale.com
Fri Oct 4 00:48:31 CEST 2013


Signed-off-by: Scott Wood <scottwood at freescale.com>
---
 Makefile           | 14 +++++++++-----
 arch/arm/config.mk |  2 --
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 1938f60..20d48e9 100644
--- a/Makefile
+++ b/Makefile
@@ -805,12 +805,16 @@ tools: $(VERSION_FILE) $(TIMESTAMP_FILE)
 	$(MAKE) -C $@ all
 endif	# config.mk
 
-# ARM relocations should all be R_ARM_RELATIVE.
+# ARM relocations should all be R_ARM_RELATIVE (32-bit) or
+# R_AARCH64_RELATIVE (64-bit).
 checkarmreloc: $(obj)u-boot
-	@if test "R_ARM_RELATIVE" != \
-		"`$(CROSS_COMPILE)readelf -r $< | cut -d ' ' -f 4 | grep R_ARM | sort -u`"; \
-		then echo "$< contains relocations other than \
-		R_ARM_RELATIVE"; false; fi
+	@RELOC="`$(CROSS_COMPILE)readelf -r -W $< | cut -d ' ' -f 4 | \
+		grep R_A | sort -u`"; \
+	if test "$$RELOC" != "R_ARM_RELATIVE" -a \
+		 "$$RELOC" != "R_AARCH64_RELATIVE"; then \
+		echo "$< contains unexpected relocations: $$RELOC"; \
+		false; \
+	fi
 
 $(VERSION_FILE):
 		@mkdir -p $(dir $(VERSION_FILE))
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 96d2d88..ce3903b 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -95,8 +95,6 @@ endif
 endif
 
 # check that only R_ARM_RELATIVE relocations are generated
-ifndef CONFIG_ARM64
 ifneq ($(CONFIG_SPL_BUILD),y)
 ALL-y	+= checkarmreloc
 endif
-endif
-- 
1.8.1.2




More information about the U-Boot mailing list